Re: Hotel Booking dates subquery

From: Scotty <invallid_at_invalid.spam>
Date: Sun, 10 Nov 2002 02:57:37 +0000
Message-ID: <99irsusn3hl706ov9saqp4n63uaublvvsg_at_4ax.com>


Scotty wrote:

>Just realised it's no good.

Ok I got it.

select * from booking
where booking_id not in (
select booking_id
from booking
where to_date('02-06-01','dd-mm-yy') -- starting date between to_date( startdate,'dd-mm-yy')
and to_date( enddate,'dd-mm-yy')
or to_date('12-06-01','dd-mm-yy') -- ending date
between to_date(startdate,'dd-mm-yy')
and to_date(enddate,'dd-mm-yy')); Received on Sun Nov 10 2002 - 03:57:37 CET

Original text of this message