Home Page for the TeradataForum
 

Archives of the TeradataForum

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


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


Subj:   Re: Deleting unwanted/duplicate records
 
From:   Fred W Pluebell

It's hard to give a complete answer without knowing the whole question. (I am assuming there is a reason to use ROW_NUMBER versus simply putting the "RT" condition in the WHERE clause.)

You get two rows because you said "PARTITION BY I_IRD" so ROW_NUMBER "starts over" for each distinct value in that column.

If you drop the PARTITION BY clause, you should get only one. But it may not be the "xxxRTxxx" one because LIKE 'RT%' only matches strings with RT as the first two characters (not in the middle).



     
  <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