Subject Sql Query
Author Shimon Salzman
Hello All,

I am John Salzman and new to your group. I am 48 and working in the field
for about 25 years mostly as a contractor.

I must be too tired and in need of a vacation as I am having difficulty
creating what should be a rather simple query, perhaps someone may have
sometime to help figure this out?

I have 3 tables as follows:

Room Table Reservation Table Check In Table


Room_ID Guest_ID Guest_ID
Room_Type Arrival_Date Check_In_Date
Departure_Date Departure_Date
Room_Type Room_Type

I need to build a query that will tell me how many rooms are available of a
particular room type for a given range of dates (arrival thru departure) ie:

How many rooms of type "SKJ" are available from
8/1/2001 to 8/5/2001.

The Room table provides the information for the number of total rooms of a
particular type. I can program this through vb, delphi, etc., however, I
think I do this through sql. Any help is appreciated.

thank you,
John Salzman

Get your FREE download of MSN Explorer at