Home Page for the TeradataForum

Archives of the TeradataForum

Message Posted: Wed, 29 Jul 2010 @ 00:27:26 GMT

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

Subj:   Re: Deleting unwanted/duplicate records
From:   Rodrigo Cifuentes

Your 'Where' clause would be the problem. Try using this:

     Select i_pol
     From ( Select * From ltc_p.vltc_er_ird_mo where i_ssn = 'xxxxxxxxxx' ) P
     Qualify Row_Number () Over
             (Partition By i_ird
              Order by Case When i_ird like 'RT%' then 0 else 1 end) = 1

  <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