B
Brad
Thanks for taking the time to read my question.
I don't know if this is possible but I need a query to tell me if my new
booking conflicts with any bookings already made. If the query returns
nothing, then there are no conflicts.
Here is an example I made up. I can't get all these scenarios to work.
Thanks,
Brad
Example:
Start Time relates to Start Date, and End Time relates to End Date
Query Returns nothing if no dates and times conflict.
Booking 1 can end at the same time booking 2 starts, or conversly booking 2
can start at the same time booking 1 ends
Current Bookings
ID StartDate EndDate StartTime EndTime
1 21-03-2006 21-03-2006 2:00 PM 5:00 PM
2 22-03-2006 22-03-2006 9:00 AM 3:00 PM
3 22-03-2006 22-03-2006 5:00 PM 11:00 PM
New Booking Examples
ID StartDate EndDate StartTime EndTime
1 22-03-2006 22-03-2006 3:00 PM 5:00 PM
2 22-03-2006 22-03-2006 12:30 PM 3:30 PM
3 22-03-2006 22-03-2006 7:00 AM 12:00 PM
4 21-03-2006 22-03-2006 4:00 PM 8:30 AM
5 21-03-2006 22-03-2006 7:00 PM 9:30 AM
6 21-03-2006 22-03-2006 5:00 PM 9:00 AM
Result
New Booking Example 1 Returns Nothing
New Booking Example 2 Returns Current Booking ID = 2
New Booking Example 3 Returns Current Booking ID = 2
New Booking Example 4 Returns Current Booking ID = 1
New Booking Example 5 Returns Current Booking ID = 2
New Booking Example 6 Returns Nothing
I don't know if this is possible but I need a query to tell me if my new
booking conflicts with any bookings already made. If the query returns
nothing, then there are no conflicts.
Here is an example I made up. I can't get all these scenarios to work.
Thanks,
Brad
Example:
Start Time relates to Start Date, and End Time relates to End Date
Query Returns nothing if no dates and times conflict.
Booking 1 can end at the same time booking 2 starts, or conversly booking 2
can start at the same time booking 1 ends
Current Bookings
ID StartDate EndDate StartTime EndTime
1 21-03-2006 21-03-2006 2:00 PM 5:00 PM
2 22-03-2006 22-03-2006 9:00 AM 3:00 PM
3 22-03-2006 22-03-2006 5:00 PM 11:00 PM
New Booking Examples
ID StartDate EndDate StartTime EndTime
1 22-03-2006 22-03-2006 3:00 PM 5:00 PM
2 22-03-2006 22-03-2006 12:30 PM 3:30 PM
3 22-03-2006 22-03-2006 7:00 AM 12:00 PM
4 21-03-2006 22-03-2006 4:00 PM 8:30 AM
5 21-03-2006 22-03-2006 7:00 PM 9:30 AM
6 21-03-2006 22-03-2006 5:00 PM 9:00 AM
Result
New Booking Example 1 Returns Nothing
New Booking Example 2 Returns Current Booking ID = 2
New Booking Example 3 Returns Current Booking ID = 2
New Booking Example 4 Returns Current Booking ID = 1
New Booking Example 5 Returns Current Booking ID = 2
New Booking Example 6 Returns Nothing