Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 22 Apr 2004 @ 21:15:22 GMT


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


Subj:   Re: RDBMS Error 2802: Duplicate row error
 
From:   Victor Sokovin

  There is a small typo in the query. It should look like -  


     >UPDATE T1 FROM table01 T1, table02 T2
     >SET
     > x1 = T2.x1
     >WHERE T1.pk1 = T2.pk1
     >;

Isn't the problem caused by the fact that T2.x1 can be an array for some pk1. All the values would be the same but it is still an array.

To eliminate the array problem you might want to try something like

     update T1
     from (select T1.pk1, T2.x1 from T1, T2 where T1.pk1 = T2.pk1 group by 1,2)
     D1
     set x1 = D1.x1
     where T1.pk1 = D1.pk1 ;

I just typed this query and did not test it so some corrections might be necessary.


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