Viewing 15 posts - 2,671 through 2,685 (of 4,087 total)
You still haven't provided expected results.
Drew
May 17, 2016 at 8:24 am
Although, if you are eventually going to "pivot" the data, it's probably better to use the ROW_NUMBER and skip the LAG/LEAD.
May 16, 2016 at 1:29 pm
J Livingston SQL (5/15/2016)
WITH cteprices as (
SELECT itmId,
price,
ROW_NUMBER() OVER(PARTITION BY...
May 16, 2016 at 12:56 pm
leon_clf (5/16/2016)
drew.allen (5/16/2016)
May 16, 2016 at 10:49 am
This is usually done with a CTE with ROW_NUMBER(). I'm showing the equivalent derived table version, since your original query used derived tables rather than CTEs.
I've also assigned your...
May 16, 2016 at 10:37 am
sqlnaive (5/16/2016)
May 16, 2016 at 9:16 am
You haven't given your desired output, but it looks like you can get what you want by simply using the nodes() function on the subtrees received from the first nodes()...
May 16, 2016 at 8:55 am
For performance problems, please post the execution plan (actual if possible, estimated if not), and the stored proc definition. Given that your error handling consists of a single simple...
May 16, 2016 at 8:37 am
copling (5/13/2016)
May 13, 2016 at 2:26 pm
ChrisM@Work (5/13/2016)
;WITH
CTE1 AS (
SELECT [Emp_no.], Org_Code, Org_Num FROM #Employee
EXCEPT
SELECT [Emp_no.], Org_Code, Org_Num FROM #Class
), CTE2 AS (
SELECT [Emp_no.], Org_Code, Org_Num FROM #Class
EXCEPT
SELECT [Emp_no.],...
May 13, 2016 at 12:15 pm
You can't directly convert an INT to a DATE. You could either convert an INT to DATETIME and then to DATE or you could use DATEADD(DAY, <your int field>,...
May 13, 2016 at 12:02 pm
b.grove (5/12/2016)
The range of revisions are from 1 to 27. Some people have 1. Some have 5....
May 13, 2016 at 7:58 am
Eric M Russell (5/12/2016)
May 12, 2016 at 2:34 pm
TheSQLGuru (5/11/2016)
May 12, 2016 at 7:56 am
Alan.B (5/11/2016)
drew.allen (5/11/2016)
May 11, 2016 at 3:59 pm
Viewing 15 posts - 2,671 through 2,685 (of 4,087 total)