Viewing 15 posts - 1 through 15 (of 44 total)
THIS WORKED LIKE A CHARM !!
CREATE TABLE #1(
ID1int identity(1,1),
sessionidvarchar(10),
[time]datetime)
INSERT INTO #1(sessionid, [time])
SELECT DISTINCT
sessionid, [time]
FROM #tmp_pna
ORDER BY sessionid, [time]
--select * from #1
-----------------------------------------------------------
--------------- GEN NEXT/PREV -----------------------------
SELECT DISTINCT
T.sessionid,
T.[time],
(SELECT MIN([time]) FROM #1...
November 21, 2016 at 11:10 am
I provided sample data located under
the data looks like this
row number----- session----- time
1 ----- 1----- 11/16/16 5:01 AM
2 ----- 1----- 11/16/16 5:19 AM
3 ----- 1----- 11/16/16 12:10 PM
1 ----- 2-----...
November 21, 2016 at 6:33 am
thanks, but that is still generating the error message.
if I remove the --&-- and just have below, it is not always correct.
when t1.[PROCEDURE] <> t2.CATEGORY and CAST(T1.entrytime AS DATE)...
August 30, 2016 at 10:29 am
thank you, I decided to use a --&-- to separate the values
August 30, 2016 at 8:07 am
what if lync server is not active? can this be done without it?
I would love to use this. I receive the following errors.
OLE DB provider "SQLNCLI10" for...
July 23, 2016 at 8:46 am
Thank you very much. Appreciate your help. Happy Friday!!!
August 7, 2015 at 6:30 am
no i did not. i posted the same information.
i was given this by someone
ROW_NUMBER() OVER (PARTITION BY patient_id ORDER BY enter_time) AS
i know enough that i need to substitute...
August 5, 2015 at 10:08 am
did not know it was until i was presented with my resolution.
August 5, 2015 at 8:57 am
someone sent me this from a different forum
ROW_NUMBER() OVER (PARTITION BY S.SESSIONID ORDER BY PL.enter_time) AS location_sequence_id
works like a charm!!!
August 5, 2015 at 8:03 am
thank you thank you thank you for teaching me something new!!!!
July 16, 2015 at 10:28 am
that query will work perfectly but I am having trouble with placement in my sp.
i receive an error
Only one expression can be specified in the select list when the...
July 16, 2015 at 9:59 am
thank you all, i appreciate it
October 28, 2010 at 6:42 am
it is a query that captures a beg inventory balance, receipts and shipments in a time frame
the beg balance is associated with the previous months end date
in jan i had...
October 26, 2010 at 1:11 pm
If the whole query returns the same number of rows whether you use UNION or UNION ALL, then use UNION ALL because it's quicker. Do you need the DISTINCT? --...
October 26, 2010 at 9:38 am
Viewing 15 posts - 1 through 15 (of 44 total)