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!

Hello end3r,

I'm finding it rather hard to understand what you mean. What do you mean by "finding intervals not covered"? Do you plan to get the results stated below? I cant seem to get what the problem is. Could you be a little clearer, please?

Regards,

Seslie

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.