date overlap
From: Eric Givler <egivler_at_flash.net>
Date: Wed, 20 Dec 2000 03:30:21 GMT
Message-ID: <hJV%5.14235$bw.1170406_at_news.flash.net>
Date: Wed, 20 Dec 2000 03:30:21 GMT
Message-ID: <hJV%5.14235$bw.1170406_at_news.flash.net>
[Quoted] What's the quickest/most efficient way to check for an overlapping date range in a SQL statement?
Table A:
blocked areas
area_eid number
start_date date
end_date date
Table B:
Reservation
Area_eid number
arrival_date date
[Quoted] departure_date date
[Quoted] I don't want to allow reservations that have a "block" record in table A [Quoted] [Quoted] with an "overlap" of the date range. There are 7 different possibilities [Quoted] for the dates to fall into, 2 of which wouldn't be overlapping the block [Quoted] (the ones where both the start and ends appear before or after the block). [Quoted] How do I detect the rest EASILY?
Thanks! Received on Wed Dec 20 2000 - 04:30:21 CET