find start and stop date for contiguous dates in multiple rows
问题 I'm having a bit of trouble displaying correct data from my table. Im not really sure what to search for either. Im not sure min(column) or max(column) will help me here. Lets see if i can explain my problem. My table contains this data: > Code (nvarchar) | DateFrom (datetime) | DateTo (datetime) > ========================================================= > 3006 | 2014-06-18 07:00:00 | 2014-06-18 08:00:00 > 3006 | 2014-06-18 09:00:00 | 2014-06-18 22:00:00 > 1006 | 2014-06-18 07:00:00 | 2014