Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Reservation view problem
Message
From
18/06/1999 14:09:53
 
 
To
18/06/1999 10:52:31
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00231366
Message ID:
00231523
Views:
17
>How about:
>
>
SELECT Rooms.iNoRoom;
>   FROM Rooms;
>   WHERE Rooms.iNoRoom NOT EXIST IN;
>      (SELECT Reservations.iNoRo;
>          FROM Reservations;
>          WHERE (ldStart BETWEEN dStart AND dEnd) OR;
>          (ldEnd BETWEEN dStart AND dEnd))
Where ldStart and ldEnd are the start and end date of the reservation you are trying to make.
>
>HTH
>
>>ROOMS :
>>inoroom (Integer, 6, Primary Key)
>>ctype (Character, 15)
>>
>>RESERVATIONS :
>>iid (Integer,6,primary key)
>>inoro (Integer,6)
>>dstart (Start date)
>>dend (End date)
>>
>>inoroom field is related 1-m with inoro into RESERVATIONS table....
>>
>>The problem is that I want to see all rooms that are NOT reserved between 2 variables date... Some of these rooms are not present in RESERVATIONS table and some are present betwwen these 2 dates and some on other dates... A room, of course can be reserved during different periodes.... Like a hotel reservation....

Thanks a lot !

Gilles
Gilles Azria
-------------------------------------------------
http://www.profiledatabase.com
http://www.photoprofile.ch
Previous
Reply
Map
View

Click here to load this message in the networking platform