Home Forums SQL Server 2008 T-SQL (SS2K8) Merging Non overlapping timedates RE: Merging Non overlapping timedates
serg-52
SSCrazy Eights
Points: 9913
More actions
September 18, 2014 at 8:31 am
#1746421
Overlap (x,y) == (x.Start <= y.End AND y.Start <= x.End)
Here overlap means intervals x and y have at least one common point. Intervals are closed, ie boundaries are included. Otherwise just replace '<=' with '<'