J
JammyDodger
I have two tables: a "Bookings" table and a "Vehicles" table. I would like to
create a query that displays all the vehicles which do not fall within 2
dates on the "Bookings" table.
So, an example: Vehicle1 from "Vehicles" is being used in a booking from 1
January 2010 to 10 January 2010. I don't want this vehicle to appear when
making a booking that falls between these 2 dates, as a vehicle cannot be
given to 2 people at the same time. I just want Vehicles 2, 3 and 4 to appear.
Also, if possible, I would like to add the condition that a Vehicle cannot
appear if it is being made in a Booking 4 days after it was returned. So, in
the previous example, Vehicle1 cannot appear for Bookings between 10 January
2010 and 14 January 2010.
I would be most extremely grateful for any help. Thanks!
create a query that displays all the vehicles which do not fall within 2
dates on the "Bookings" table.
So, an example: Vehicle1 from "Vehicles" is being used in a booking from 1
January 2010 to 10 January 2010. I don't want this vehicle to appear when
making a booking that falls between these 2 dates, as a vehicle cannot be
given to 2 people at the same time. I just want Vehicles 2, 3 and 4 to appear.
Also, if possible, I would like to add the condition that a Vehicle cannot
appear if it is being made in a Booking 4 days after it was returned. So, in
the previous example, Vehicle1 cannot appear for Bookings between 10 January
2010 and 14 January 2010.
I would be most extremely grateful for any help. Thanks!