Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 05 May 2004 @ 20:12:46 GMT


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


Subj:   Re: Deleting Duplicates with a single DELETE statement
 
From:   ulrich arndt

Vivek,

one question - are the rows idententical in all columns - which means is it a multiset table?

You might try the following - I can't verfiy currently on my own:

     delete from big_table
     where (field list,row_id) in
            (select field list,row_id
             from big_table
             group by field list
            qualify csum(1,field list) > 1
            )
     ;

I am not sure if it is row_id or rowid..

Ulrich



     
  <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