Re: Hotel Booking dates subquery

From: Scotty <invallid_at_invalid.spam>
Date: Sun, 10 Nov 2002 02:25:30 +0000
Message-ID: <0sgrsuctlseepau8joqfrtjvddck2iu6jn_at_4ax.com>


Scotty wrote:

>Well I ended up with a longer winded version
>
>SELECT room_id,startdate,enddate
>FROM booking
>WHERE startdate
>BETWEEN to_date(booking_start_date,'dd-mm-yy')
>AND to_date(booking_start_date,'dd-mm-yy')
>AND enddate
>BETWEEN to_date(booking_end_date,'dd-mm-yy')
>AND to_date(booking_end_date,'dd-mm-yy');
>
>Checks if the rooms start date or end date falls between a booking
>period... I think.

Just realised it's no good. Received on Sun Nov 10 2002 - 03:25:30 CET

Original text of this message