Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Tue, 13 Nov 2001 @ 17:56:43 GMT


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


Subj:   Error 2801 Duplicate Unique Prime Key
 
From:   Tom Wrobel

I HAVE ENCOUNTERED A SITUATION ON V2R4. I HAVE 2 TABLES (TEST1 and TEST2) THAT ARE IDENTICAL IN DEFINITION AND ALSO IN CONTENT. THE TABLE DESCRIPTION IS:

    CREATE SET TABLE DB.TEST1 ,NO FALLBACK ,
         NO BEFORE JOURNAL,
         NO AFTER JOURNAL
         ( FIELD1 CHAR(1) ,
          FIELD2 CHAR(1) ,
          CNT DECIMAL(10,0))
    UNIQUE PRIMARY INDEX ( FIELD1 ,FIELD2 );

IF I PERFORM THE FOLLOWING SQL, I RECEIVE ERROR 2801

INSERT INTO  DB.TEST1  (FIELD1,FIELD2,CNT) VALUES ('1','1',0)

HOWEVER, IF I PERFORM THIS SQL, I RECEIVE NO ERROR WITH ONLY A MESSAGE OF ZERO ROWS INSERTED. AS THE TABLES ARE DUPLICATE, I BELIEVE I SHOULD HAVE RECEIVED 2801.

INSERT INTO DB.TEST1 SELECT * FROM DB.TEST2


     
  <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