Anonymous
Anonymous asked in Computers & InternetSoftware · 10 years ago

microsoft access help?

I need help retrieving the number of rooms that have/had no bookings made in them.

I have the tables:

Room (RoomID)

Booking (BookingID, DateBookingMade, StartDate, EndDate, etc.)

Room_Booking (BookingID and RoomID)

I can get it so that I can get all the rooms with bookings made in them, but am not sure how to reverse it. I know it's a "is null" function, but it's just not working.

1 Answer

Relevance
  • 10 years ago
    Best Answer

    SELECT Room.RoomID

    FROM Room_Booking RIGHT JOIN Room ON Room_Booking.RoomID = Room.RoomID

    WHERE Room_Booking.RoomID Is Null;

Still have questions? Get your answers by asking now.