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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top