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 ArticleOpenquery 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 ArticleWant 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 ArticleIgnore 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 ArticleLogical 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 ArticleReport 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 Articledb_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 ArticleSSIS - 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 ArticleFormatting 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 ArticleIs_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 ArticleAre 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 ArticleFirst 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 ArticleHow 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 ArticleFlat 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 ArticleMember 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 ArticleRenaming 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 Articlejson search
we have json getting stored in one of the tables and how can we search inside the json.
View ArticleUsing 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 ArticleHow 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 Articlesplit 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