I have:
a) a calendar table (tblCalendar) holding consecutive dates.
b) a vacancies table (tblVacancies) holding start and end dates of
vacancies
c) a bookings table (tblBookings holding start and end dates of each
booking for a given vacancy.
Can anyone tell me how I can generate, with queries, start and end
dates for the vacant periods of a given vacancy? e.g.
tblVacancy (for a given vacancy) holds: fldStart = 10/1/04, fldEnd =
15/3/04
tblBookings holds, say, three bookings (periods where the vacancy has
been filled)
: fldStart = 20/1/04, fldEnd =
25/1/04
fldStart = 7/2/04, fldEnd =
9/2/04
fldStart = 19/2/04, fldEnd =
25/2/04
I want a query which will produce (the periods during which the
vacancy is still vacant:
fldStart = 10/1/04, fldEnd =
19/1/04
fldStart = 26/1/04, fldEnd =
6/2/04
fldStart = 10/2/04, fldEnd =
18/2/04
fldStart = 26/2/04, fldEnd =
15/3/04
Would be most grateful for anyone's help.
Brian