Viewing 15 posts - 916 through 930 (of 1,469 total)
The LAG function was introduced in SQL 2012, which would allow you to do it like this
SELECT [Emp ID], [time]
, [prev time] =...
January 31, 2018 at 9:47 pm
Since this is a SQL 2008 board, I am assuming that you are 2008.
The following should give you the correct resultsWITH cteTime AS (
...
January 31, 2018 at 9:45 pm
January 29, 2018 at 9:23 pm
Why not use a table-value type as a parameter. Then you simply select from the parameter into the destination table
January 23, 2018 at 10:40 pm
Lynn Pettis - Tuesday, January 23, 2018 5:54 PMSPAM alert. It just started to explode.
2 valid posts in 8 pages. The rest...
January 23, 2018 at 9:07 pm
January 23, 2018 at 8:07 am
January 22, 2018 at 2:03 am
January 21, 2018 at 9:26 pm
Mathew McGiffen's blog post Avoid “Constants” in T-SQL shows how the use of a local variable results in a scan, and excessive estimations.
January 17, 2018 at 10:46 pm
Why use the prod server?
Rather do a side-by-side install on the test server, and then export/import the data from one DB to the other.
January 16, 2018 at 10:34 am
January 16, 2018 at 4:08 am
I missed the ADDED snapshots
This should take care of Added, Removed, and Changed snapshotsWITH cteLead AS (
SELECT [ID], [SnapshotDate], [ProjectName], [ProjectValue]
...
January 10, 2018 at 12:43 am
Viewing 15 posts - 916 through 930 (of 1,469 total)