Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Finding consecutive dates
Message
From
12/03/2002 17:22:21
John Deupree
Long Term Care Authority
Tulsa, Oklahoma, United States
 
 
To
12/03/2002 17:08:06
Jason Dalio
Northern Interior Regional Health Board
Prince George, British Columbia, Canada
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Miscellaneous
Thread ID:
00631782
Message ID:
00631802
Views:
24
Your code returns 1 group with 2001-01-05 as the min begin and 2001-01-11 as the max end. I need groups of consecutive dates only as in my example.

Thanks for the reply.

John

>
>SELECT Consumer, Provider, Service, Min(Begin) AS MinOfBegin, Max(End) AS MaxOfEnd
>FROM MyTable
>GROUP BY Consumer, Provider, Service;
>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform