|
Posted by Buzby on 10/02/71 11:33
Hi - hope I'm in the right place - I'm having trouble with a sql statement
for a web page using access as the db (explains the date bit!)
I have two tables - RoomTypes and Availability. The query below brings back
the information I need - except I need to filter it one more time and
exclude any room that has a 0 in a field call AvailDayShow (in the
Availability table) in it across a selected date range. (It's basically
looking across a date range and if a room value is 0 for AvailDayShow in
this range the rooms not bookable so don't show it)
SELECT DISTINCT
RoomTypes.RoomID,
RoomTypes.RoomHotelID,
RoomTypes.RoomType,
RoomTypes.RoomCode,
RoomTypes.RoomDescription,
RoomTypes.RoomIncludes,
Availability.*
FROM
(RoomTypes
INNER JOIN Availability ON
RoomTypes.RoomID = Availability.AvailRoomID)
Where (Availability.AvailDate between #12/09/2005# AND #12/13/2005#)
TIA!!
Hope this makes sense!
Buzby
Navigation:
[Reply to this message]
|