Hello All!
I've done just your basic queries and have no problems with those, but now I find myself into a project that has two tables - with identical columns - that must be joined.
Both tables (one named Occupancy, the other Reservations) have the following columns:
CheckIn, CheckOut, TimeStamp, RoomNumber, BookingType, BookingAgent, ConfirmNum_FK, RoomCategory_FK
When a user tries to make a reservation, I want to join the CheckIn, CheckOut, RoomNumber, RoomCategory columns from both tables to find out how many rooms have been booked between two dates submitted by a user.
I've tried this query, but it's not working:
SELECT CheckIn, CheckOut, RoomNumber, RoomCategory
FROM occupancy, reservations
WHERE CheckIn < '2006-12-02' AND CheckOut > '2006-12-26';
The "testing" dates shown in the above query will be replaced with Vars, but I don't think that's the problem.
Appreciate all assistance,
Expatriate