Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Tue, 01 Apr 2008 @ 23:29:17 GMT


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


Subj:   Re: Duplicate Row Error during an Update
 
From:   McCall, Glenn David

  Can someone explain what a duplicate row error is?  


  I'm getting this error when I try to run an update statement (using the from clause)  


I would have thought the meaning was obvious but it means this:

1) You have a table like this

     Create table dup_row_error (
          I1 integer,
          I2 integer
     );

2) with this data

     Insert into dup_row_error values (1, 2);
     Insert into dup_row_error values (1, 3);

3) and you do something like this:

     Update dup_row_error
          Set i2 = 2
     Where i2 = 3;

The error occurs because the table is defined as "set". This means that duplicate rows are not allowed. In general, rows that are identical (i.e. duplicates) are not of much use (how do you distinguish between them?). Sometimes people allow disable the "set" definition to speed up loading processes.


Hope this helps

Glenn Mc



     
  <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