Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 29 Jul 2010 @ 14:19:19 GMT


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


Subj:   Re: Deleting unwanted/duplicate records
 
From:   KOPUURAVURI, RAMU

Use the rank() function in qualify clause.

     Select i_pol
     ,i_ird
     ,n_lst
     ,n_fst
     ,i_ssn
     ,d_bth
     From ltc_p.vltc_er_ird_mo
     Qualify rank() Over (Partition By i_ird
     Order by Case When i_ird like 'RT%' then 0 else 1 end) = 1
     Where  i_ssn = 'xxxxxxxxxx'

Regards,

Ramu K
AT&T



     
  <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: 23 Jun 2019