Finding time overlaps

  • Thread starter Thread starter JKlein
  • Start date Start date
J

JKlein

I have a table that holds meeting data: EmployeeID, MeetingDate, StartTime,
and EndTime. I need a query that shows all the records that have overlaping
times.
Any Ideas?
 
JKlein said:
I have a table that holds meeting data: EmployeeID, MeetingDate, StartTime,
and EndTime. I need a query that shows all the records that have overlaping
times.


SELECT T.EmployeeID, T.MeetingDate, T.StartTime, T.EndTime
FROM table As T, table As X
WHERE T.EmployeeID = X.EmployeeID
AND T.MeetingDate = X.MeetingDate
AND T.StartTime < X.EndTime
AND T.EndTime > X.StartTime
 
Back
Top