Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 19 Aug 2004 @ 14:33:15 GMT


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


Subj:   DELETE recommendations?
 
From:   Anomy Anom

<-- Anonymously Posted: Thursday, August 19, 2004 10:23 -->

The scenario is explained below -

Table 1 - has 3 columns as part of PK and 3 non-PK columns

     PK1    PK2    PK3    COL1    COL2    COL3
     A       B      C1      1       2       3
     A       B      C2      1       2       3
     A       C      D       1       2       3
     X       Y      Z       1       2       3
     P       Q      R       1       2       3

I need to delete the records from the table which have matching PK1 and PK2 but different PK3. eg - first 2 records in the above list.

There may be case when there are more than 2 rows with such combination. There can be multiple such combinations as well.


TIA



     
  <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