Viewing 15 posts - 2,686 through 2,700 (of 15,381 total)
rupas2000 (7/2/2015)
For a single S_ID it is giving correct value but when I query on all...
July 2, 2015 at 9:20 am
rupas2000 (7/2/2015)
I have written a code like below:
SELECT
S_ID,
LAG(S_ACTV_CODE, 1) OVER (ORDER BY S_DATETIME ASC) AS S_ACTV_CODE_PREV,
S_ACTV_CODE,
S_USER,
S_DATETIME AS START_TIME,
LEAD(S_DATETIME, 1) OVER (ORDER BY S_DATETIME ASC) AS END_TIME,
DATEDIFF (SECOND, S_DATETIME,
LEAD(S_DATETIME, 1)...
July 2, 2015 at 9:09 am
Lynn Pettis (7/2/2015)
July 2, 2015 at 9:06 am
John Mitchell-245523 (7/2/2015)
July 2, 2015 at 8:23 am
rupas2000 (7/2/2015)
Thanks for your reply. I have written a code using LEAD/LAG but it is working partially.
As I am new to this forum, not sure where I can...
July 2, 2015 at 8:21 am
mcfarlandparkway (7/2/2015)
I have a report where i am calling storedprocedure to get the data.In test Environment the same report and same data is working perfectly.
When...
July 2, 2015 at 7:50 am
Luis Cazares (7/2/2015)
jasona.work (7/2/2015)
OTOH, got plenty to...
July 2, 2015 at 7:45 am
ChrisM@Work (7/2/2015)
Sean Lange (7/2/2015)
jasona.work (7/2/2015)
OTOH, got plenty...
July 2, 2015 at 7:45 am
Hi and welcome to the forums. Since you are posting in the 2012 forum I assume you must be using sql 2012. You can use the LEAD/LAG functions to do...
July 2, 2015 at 7:35 am
This article explains how to this type of thing quite easily.
http://www.sqlservercentral.com/articles/comma+separated+list/71700/%5B/url%5D
July 2, 2015 at 7:32 am
jasona.work (7/2/2015)
OTOH, got plenty to look forward...
July 2, 2015 at 7:13 am
OLSONEJ (7/1/2015)
My editor is not liking the Rows or the order by part. I am trying to run this as query.
The query that was posted will not work on...
July 1, 2015 at 1:40 pm
OLSONEJ (7/1/2015)
July 1, 2015 at 12:51 pm
Lynn Pettis (7/1/2015)
Sean Lange (7/1/2015)
Grant Fritchey (7/1/2015)
Sean Lange (7/1/2015)
jasona.work (7/1/2015)
Half the people (the smart ones?) take the other...
July 1, 2015 at 12:44 pm
Lynn Pettis (7/1/2015)
July 1, 2015 at 12:32 pm
Viewing 15 posts - 2,686 through 2,700 (of 15,381 total)