use Reservations select C.name from dbo.Hotel H left outer join dbo.xrefHotexRoom xHR on H.hotelId = xHR.hotelId LEFT OUTER JOIN dbo.Room R on xHR.roomId = R.roomId left outer join dbo.xrefRoomxCustomer xRC on R.roomId = xRC.roomId left outer join dbo.Customer C on xRC.customerId = C.customerId where R.booked = 1
select R.roomNumber , H.hotelname from Room R left outer join xrefHotexRoom xHR on R.roomId = xHR.roomId left outer join Hotel H on xHR.hotelId = H.hotelId where R.bed = 1 and R.smoking = 1 and R.fridge = 0 and R.hottub = 0 and H.bar = 0 and H.exercise = 0 and H.pets = 0 and H.[pool] = 1 and H.restaurant = 1 and H.wireless = 1
select H.hotelname, r.roomNumber, rt.name, xHRT.rate from Hotel H left outer join xrefHotexRoom xHR on H.hotelId = xHR.hotelId left outer join Room R on xHR.roomId = R.roomId left outer join dbo.xrefRoomxType xRT on R.roomId = xRT.roomId left outer join dbo.RoomType RT on xRT.typeId = RT.typeId left outer join xrefHotelxRoomType xHRT on xRT.typeId = xHRT.typeId AND H.hotelId = xHRT.hotelId where R.booked = 0 order by xHRT.rate
More to Come, CA.
No comments:
Post a Comment