Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 17 Aug 2005 @ 16:23:56 GMT


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


Subj:   Re: Deleting Duplicate rows
 
From:   Victor Sokovin

  I need an approach which will delete duplicate rows i.e. finally I will have 4 rows in my table.  


  I don't want to create another table for this activity.  


I think this is "almost" impossible. Let me explain why.

If you need to delete all-column duplicate rows you'll need to fully qualify them. As all the visible column values are identical, you'll need to add the so called ROWIDs (this statement might be a theorem but I assume it as an axiom here).

Now, what is the problem with ROWIDs? NCR do not want us to use them! Their usage is "officially" discontinued in DML statements as of V2R5.1. And probably there is a good reason for not using them. Even if you are on a lower release and have access to ROWIDs, any production solution based on them is not going to be long-lasting.

But if you just need this as an ad hoc solution or your interest is of pure academic nature, then try this:

www.teradataforum.com/teradata/20040505_201246.htm .

OK, there is a GROUP BY there, and you seem to dislike it. No problem. Just combine Ulrich's solution with the last contribution in the thread:

www.teradataforum.com/teradata/20040506_150818.htm .


If you ask me, I would go for Donald's solution. Just because ROWIDs may not be used in DML on current releases.


Regards,

Victor



     
  <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