sbbrown9924
Technical User
Hello;
About 6 months ago I had asked for assistance to help count the number of patients seen in an ER by hour. The query was:
SELECT Partition(DateDiff('n',TriageTime, InRoomTime)/60, 0, 10, 1) AS [WaitingTimeRange], Count(*) As [Patients] FROM Archive WHERE (TriageTime > #DateBegin#) AND InRoomTime<>#1/1/1900# GROUP BY Partition (DateDiff('n',TriageTime, InRoomTime)/60, 0, 10, 1)
Someone (sorry, I lost the link) had given me a link to a MSDN tech page explaining the partition function. Can anyone point me to that page again? I am trying to format the output. Right now its
0:0 7
1:1 14
2:2 456
3:3 43
etc.....
I'd like for it to
0:1 7
1:2 14
2:3 456
3:4 43
etc...
so the hourly intervals make more sense. So 0:1 is "from 0 to one hour, 1:2 is "from 1 to 2 hours", etc...
Thanks.
About 6 months ago I had asked for assistance to help count the number of patients seen in an ER by hour. The query was:
SELECT Partition(DateDiff('n',TriageTime, InRoomTime)/60, 0, 10, 1) AS [WaitingTimeRange], Count(*) As [Patients] FROM Archive WHERE (TriageTime > #DateBegin#) AND InRoomTime<>#1/1/1900# GROUP BY Partition (DateDiff('n',TriageTime, InRoomTime)/60, 0, 10, 1)
Someone (sorry, I lost the link) had given me a link to a MSDN tech page explaining the partition function. Can anyone point me to that page again? I am trying to format the output. Right now its
0:0 7
1:1 14
2:2 456
3:3 43
etc.....
I'd like for it to
0:1 7
1:2 14
2:3 456
3:4 43
etc...
so the hourly intervals make more sense. So 0:1 is "from 0 to one hour, 1:2 is "from 1 to 2 hours", etc...
Thanks.