Quantcast
Channel: SQLServerCentral » SQL Server 2014 » Development - SQL Server 2014 » Latest topics
Browsing all 3145 articles
Browse latest View live

Exclude the data starts with ING

Hello, how to write a query - to exclude the field that starts with ING select * form table where ID NOT LIKE 'ING%' ? I want to exclude ING from all the records? Data - for ID looks like...

View Article


Openquery to oracle take along time why?

if i run this in oracle , also throw network its took 0.24 sec , very qucick "select SEQ_ID, FCLTY_ID, ACTION_CODE, SKU_ID, SKU_DESC, UPC, INNER_PACK_QTY, "GROUP", LOCN_ID, IS_DOWNLOADED,...

View Article


Want to populate Col B (Datetime) from last 10 characters of Col A (nvarchar)

Hi all, Got a bunch of date data in the wrong column, I'd like copied into a column on the same table. Here's as far as I've got: Update dbo.ReadingList --SELECT convert (Datetime, RIGHT(Title, 9)) Set...

View Article

Ignore reading signs

I am in need of a way to ignore reading signs, for example: - I search on (like?) 921996 it will find the record with 92.1996 or 1219!96 Is there a way to achieve this?

View Article

Logical Reads x Buffer Pool Content

Hi All. I'm troubleshooting a specific query performance, and one of the first thing that i do is to check the statistics IO output. Below is one of the lines from statistics io result Table 'XXXXXX'....

View Article


Report Showing Month with Highest Count

I have a table that stores EmployeeID, and Date. I want to create a report for 2016 that shows what the best month, by highest record count, for each employee. I have no idea how to accomplish this....

View Article

db_Mail Syntax error message when attempting to pass variable to @Body

To all: For some reason, when I attempt to add a variable to the string of my @Body I get them error message Incorrect syntax near '+'. Here is my code, any suggestions are appreciated in advance!...

View Article

SSIS - script component as source error

Hi, I am at a bit of a loss here and really hoping someone can help. I have an SSIS package that has a script component as source, it calls an API to pull data across the web and into SQL Server. When...

View Article


Formatting Data for Reporting

I would like to create a hierarchal report that groups data by VP, Districts the VP oversees, and Location details for each District. My hope is to produce a report as seen in the enclosed...

View Article


Is_Rolemember with AD group

We are using a Windows AD group to control access to login and to a certain DB The login works perfect, anyone in the group can use a trusted connection and login. The problem is we assigned a User...

View Article

Are there any limits to Pivoting

We have a database that has been designed to service the application - currently there is no real reporting database, reporting is done off a replicated copy of the live DB. (This is changing and I...

View Article

First occurrences

Hi, Below is the table and results I am looking for......i am an SQL newbie. Game Play_Id Team Player EVENT 1 1 1 2 A Frank 3 1 3 A John 2 1 4 B Michael 4 2 1 2

View Article

How to correct this timestam for the current day?

Hello, I'm creating a timestamp of the actual day (from this day's midnight to the other's), but I'm having some issues... One of the problems is that with the code that I have, I can only get the...

View Article


Flat table for parent child

Hi, I want to create a flat table as shown in the desired results using the temp table. CREATE TABLE #MyTestTable ( Title NVARCHAR(200), ID NVARCHAR(100), ChildID NVARCHAR(650) ) INSERT INTO...

View Article

Member Seraching in Cubes

Hello All, I have a specific member to search in a cube/perspective. I have the member name with me. All I need to know is if that member exists in dimension and hierarchy do we need to specify that...

View Article


Renaming fields and combining them into one column

I have a table with the following structure. Ind_Id | First_Name | Last_Name | FootBall | Soccer | Baseball | Basketball | Volleyball | Fuseball The sports columns have 'Y' or 'N' values. I would like...

View Article

json search

we have json getting stored in one of the tables and how can we search inside the json.

View Article


Using a variable in CTE Select statement

I have to write a query that lists orders and partitions them by customer id# and displays the date, customerid, name, order_amount and count on each line. I then need to match that against a retailer...

View Article

How to join one table to another that needs pivoting?

Hi All, I've inherited a database that contains VMWare server information such as CPU, RAM, Disks, etc. And I need to run a monthly report that shows the server spec for each VM. VCenter is polled for...

View Article

split one column into two based on numbers (NOT PIVOT)

I have a column something like below Number 14522345 15235642 16289563 16287423 30245123 31451831 32452632 31458142 I need to split into two columns Number A Number B 14522345 30245123 15235642...

View Article
Browsing all 3145 articles
Browse latest View live