Hi guys,
I have the following problem
select a.id, a.start_date, a.end_date, b.start_date, b.end_date
from interval_1 a,
interval_2 b
where a.id = b.parent_id
This will generate a solution like:
5 | 01-Apr-2012 08:30:00 | 01-Apr-2012 12:00:00 | 01-Apr-2012 09:30:00 | 01-Apr-2012 10:00:00
5 | 01-Apr-2012 08:30:00 | 01-Apr-2012 12:00:00 | 01-Apr-2012 11:00:00 | 01-Apr-2012 11:15:00
I need to find the intervals not covered, so in this example these would be:
01-Apr-2012 08:30:00 | 01-Apr-2012 09:30:00
01-Apr-2012 10:00:00 | 01-Apr-2012 11:00:00
01-Apr-2012 11:15:00 | 01-Apr-2012 12:00:00
I'm out of ideas.
Please help!