Viewing 15 posts - 166 through 180 (of 431 total)
I get it now. Thanx for your patience.
November 8, 2016 at 11:22 am
The temp table #Data is essentially #Test in my sample data. So, I want to get the number of visits that occur between 3PM and 2AM. It doesn't matter what...
November 8, 2016 at 11:05 am
Where would I get the value for @Date?
November 8, 2016 at 10:41 am
Here's my where clause, "where convert(time, t.RegistrationDateTime, 121)>='15:00:00.0000000' and convert(time, t.RegistrationDateTime, 121)<'02:00:00.0000000'".
I didn't get any results but, if I run the query with '22:00:00.0000000', I get results.
November 8, 2016 at 10:21 am
Thanks for the input. I'll take a peek at your stuff.
October 18, 2016 at 8:18 am
Works like a charm. Thanx.
October 18, 2016 at 8:00 am
This is the function to parse the parameter string. The parameters are doctors' full names that contain commas so, I need to use a pipe or semi colon or something...
October 18, 2016 at 6:51 am
Thank you very much.
October 5, 2016 at 4:42 am
Thanx. That helps.
October 4, 2016 at 5:40 am
I don't get how the cross apply is working. My limited experience is using it like a join. I'm using 2008 Express but, I suppose I could download 12.
October 4, 2016 at 5:29 am
This is what I came up with.
;with Data
as
(
selectAccountNumber,
DischargeDateTime,
RegistrationDateTime,
datediff(minute, RegistrationDateTime, DischargeDateTime) as TAT
from #Test
),
TAT
as
(
SELECTWeekEnding,
TAT,
row_number() over(partition by WeekEnding order by TAT) as RowNum,
count(*) over(partition by WeekEnding) as Cnt
FROM Data t
CROSS APPLY...
October 4, 2016 at 5:17 am
Viewing 15 posts - 166 through 180 (of 431 total)