
June 1st, 2004, 02:41 AM
|
|
Registered User
|
|
Join Date: Jun 2004
Posts: 1
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
Can't figure this out. Can anyone else figure it out?
I have a table that contains a type of hotel room(referenced to another table that gives information about the hotel rooms) and the date that it is reserved for. Now, what i'd like to be able to do is to enter a date range and have a query retrieve the dates that are available.
SELECT *
FROM rooms R
WHERE R.roomid NOT IN (SELECT RR.roomid
FROM room_reserve RR
WHERE RR.ondate > "some start date" AND
WHERE RR.ondate < "some end date");
this ends up showing no rooms if i do a date range from the beginning of the year till the end of the year. can someone think of another way to do this? thanks.
|