Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 18 Aug 2005 @ 08:17:12 GMT


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


Subj:   Re: Deleting Duplicate rows
 
From:   Dennis Calkins

On Wed, 17 Aug 2005 14:31:26 -0400, TeradataForum wrote:

  Here is a way of deleting duplicate rows the way you want it...  


          >3) delete from test1 where substr(rowid,9,1) > '01'xb;

This Type of usage is one of the reasons we now disallow this.

Your assumption here is a HASH Duplicate means you have a Duplicate Row.

What about 2 different values which generate the same HASH value. Called a HASH SYNONYM. You just deleted rows which weren't duplicates. OOPS.

Also you are are assuming you have < 256 duplicates since the UNIQ[0] will equal 0x00 when we reach 256 hash duplicates and every 256th value after that.

Bad things happen when you make assumptions about the way something is implemented.



     
  <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