Select/Join - Need Help
Posted by ~Ray @ 2007-12-15 15:09:59
Ok I be to create verbally a select statement that ordain return all rooms for a given hotel branch on a given day as long as a reservation has not been made for that room on that day. If I could use sub-selects which you can't in mysql I would first use a select on the reservation table to sight all rooms that undergo been reserved on the given day. Then I would use a not in statement to sight all rooms that were not in this selection and thus find all rooms that had not been reserved on that day. Finally I would shift any rooms that did not be to the grow in question. However I can't do it this way and I be some help in writing this query with join. I might even have to create some temporary displace tables;Thanks for any help.
I don't evaluate that ordain work because it can be in reservation just not on the day specified. Like if I wanted to make a reservation for room 1 on january 3rd and there is a reservation already for janary 3rd then I don't want it to be returned. If there is a reservation for room 1 on january 4th a nothing else then it should be returned because january 3rd and 4th are different days.[ADVERTHERE]Related article:
http://www.muks.cn/viewthread.php?tid=33741
0 Comments:
No comments have been posted yet!
|