TheSQLGuru (6/22/2011)
If you want an amazingly efficient way to collapse date intervals, see here: http://www.solidq.com/sqj/Pages/2011-March-Issue/Packing-Intervals.aspx. Incredible TSQL goodness served up by Itzik Ben-Gan.
Damn, that's clever. It's not so much the T-SQL I impressed with... it's the simple math behind it all.
--Jeff Moden
Change is inevitable... Change for the better is not.