Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 03 Jul 2003 @ 17:37:06 GMT


     
  <Prev Next>   <<First <Prev
Next>
Last>>
 


Subj:   Re: Selecting the min. non-null date
 
From:   Jake Johnson

Here is another way...

select Min(date), max(date)
FROM (
select row_id, date1 date
from table1
union all
select row_id, date2 date
from table 2
union all
select row_id, date3 date
from table 3
union all
select row_id, date4 date
from table 4
) tmp
group by row_id


God Luck,

Jake Johnson



     
  <Prev Next>   <<First <Prev
Next>
Last>>
 
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 15 Jun 2023