RE: Simply question (for gurus maybe)

RE: Simply question (for gurus maybe)

 

  

How about
Select a.ID, greatest(a.startdate,b.startdate), least(a.enddate,b.enddate)
From table1 a, table2 b
Where a.id=b.id


-----Original Message-----
From: sparacello [mailto:[Email Address Removed]
Sent: Thursday, February 26, 2004 10:02 AM
To: LazyDBA.com Discussion
Subject: Simply question (for gurus maybe)

I need to merge and intersect two table creating a new time interval.
date format = DD/MM/YYYY
I will try to semplificate my big table.. I just need to understand the WAY
table1
ID start_date end_date
01 01/01/1900 05/02/2004
02 05/02/2004 31/12/9999
table2
ID start_date end_date

01 01/01/1900 15/10/2004
02 15/10/2004 31/12/9999
I need to have a view like this
01 01/01/1900 05/02/2004
02 05/02/2004 15/10/2004
03 15/10/2004 31/12/9999


--
Email.it, the professional e-mail, gratis per te: http://www.email.it/f

Sponsor:
Hai un sito web? Allora guadagna anche tu con il Web Marketing !
Collegati subito.
Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=1554&d=26-2
Oracle LazyDBA home page