Hi all,
I have two tables, Room_Valid and Room_Avail. The Room_Valid table holds valid room numbers. The Room_Avail table holds codes for room availability.
The query below returns all the records from Room_Valid along with any Room_Avail codes if a room number in Room_Valid matches a room number in Room_Avail.
SELECT DISTINCT
Room_Valid.Room AS RoomNo,
Room_Avail.Avail AS Comp,
Room_Avail.UniqueID
FROM
Room_Valid
Left Outer Join Room_Avail ON Room_Valid.Room = Room_Avail.Room
WHERE
Room_Valid.HotelID = 'LON'
ORDER BY Room_Valid.Room ASC
What I would like to do is return all the records from Room_valid if no match is found in Room_Avail.
I am slightly stuck on how to construct the query.
Can you help.
Many thanks in advance.