Home Page for the TeradataForum
 
https:

Archives of the TeradataForum

Message Posted: Thu, 16 Aug 2007 @ 15:39:45 GMT


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


Subj:   Re: Working with duplicate rows
 
From:   D silva, Joseph Vinish

  I have a multiset table with duplicate rows. Rows with same values across all the columns.  


  Is it possible to find out, which record was inserted the last.  


  <snip>  


  note: in oracle, there is something as rowid, which is used for this.  


I am afraid not, I guess my question would be, even if you hypothetically knew which row came first/last ... What is the objective of knowing that ?

If you are planning to "delete" the rows that came in later, It doesn't make any difference from an SQL perspective whether you deleted the "first" row or the "last" row ... All SQL cares is that it finds a row with the required values.

So perhaps the question would be how to get rid of duplicate records ...

Most folks prefer to do an insert/select into a SET table to accomplish that.


That's my $0.02 on this ...

Joseph D'silva



     
  <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: 28 Jun 2020