Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 02 Jul 2003 @ 21:18:02 GMT


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


Subj:   Re: Selecting the min. non-null date
 
From:   Burton, Bruce

here is the code I'm trying to get to work...

this code does not seem to work on a join condition. are there rules for spanning columns with a "min" function and/or issues with using the "min" in a join condition? I'm basically trying to compare a "min" series of dates from one table to a "max" series of dates on another table.

sel *
from
        table1 t1
left join
        table2 t2
on t1.column1=t2.column1
and min(t1.date1,t1.date2,t1.date2,t1.date4)-
max(t2.date1,t2.date2,t2.date3,t2.date4)<=365

Any help is appreciated.


Thanks,

Bruce



     
  <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