Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Tue, 09 Nov 2010 @ 14:32:42 GMT


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


Subj:   Re: Compare data in same column
 
From:   sivaji.gv

How about:

     Sel member_id, case when add_months(mindate, 12) - maxdate  >=0 then 'Yes'
     else 'No' end
     (
     Sel member_id, max(date_admitted) maxdate, min(date_admitted) mindate
     >From t1
     Group by 1
     )derv ;

     (Not tested).

Regards,

Sivaji GV
DWSDBA



     
  <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