retro83
09-30-2007, 10:24 AM
Hello there,
I have tables like so (simplified):
-=Holiday=-
HolidayID
Name
Date
-=Booking=-
BookingID
HolidayID
ClientID
What I would like to do is create a query which returns a list of all the holidays with a field showing how many bookings have been created for each holiday. This almost works:
SELECT Count(1) AS CountOfBookingID, Bookings.HolidayID
FROM Bookings
GROUP BY Bookings.HolidayID;
...but it does not display holidays where there are no bookings.
Is it possible to create one which will show all holidays even if there are no bookings?
Thanks!:cool:
I have tables like so (simplified):
-=Holiday=-
HolidayID
Name
Date
-=Booking=-
BookingID
HolidayID
ClientID
What I would like to do is create a query which returns a list of all the holidays with a field showing how many bookings have been created for each holiday. This almost works:
SELECT Count(1) AS CountOfBookingID, Bookings.HolidayID
FROM Bookings
GROUP BY Bookings.HolidayID;
...but it does not display holidays where there are no bookings.
Is it possible to create one which will show all holidays even if there are no bookings?
Thanks!:cool: