Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Tue, 24 Jan 2012 @ 20:42:26 GMT


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


Subj:   Unique index vs. primary index
 
From:   Issah, Gabriel

I just altered a table by changing the unique primary index from (Inv_Id, Strt_Dttm, Inv_prod_group) to UNIQUE PRIMARY INDEX ( Prod_Id ) but I am getting

"Duplicate unique prime key error in DW_T_Test.Prod"


what am I doing wrong here.

     CREATE SET TABLE DW_T_Test.Prod ,NO FALLBACK ,
          NO BEFORE JOURNAL,
          NO AFTER JOURNAL,
          CHECKSUM = DEFAULT,
          DEFAULT MERGEBLOCKRATIO
          (
           Prod_Id INTEGER TITLE 'Product Id' NOT NULL,
           Inv_Id INTEGER TITLE 'Inventory Id' NOT NULL,
           Strt_Dttm TIMESTAMP(6) TITLE 'Start Dttm' NOT NULL,
           End_Dttm TIMESTAMP(6) TITLE 'End Dttm',
           Inv_Prod_Grp_Id INTEGER TITLE ' Inventory Product Group Id' NOT NULL,
           Calc_Cd VARCHAR(20) CHARACTER SET LATIN NOT CASESPECIFIC TITLE 'CALCULATION Cd',
           Hist__Prod_Id VARCHAR(20) CHARACTER SET LATIN NOT CASESPECIFIC TITLE 'Hist Product Id' NOT NULL,

           inv_Age SMALLINT TITLE 'inventory Age',

           DW_Insrt_Dttm TIMESTAMP(6) TITLE 'DW_Insrt_Dttm' NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
           DW_Updt_Dttm TIMESTAMP(6) TITLE 'DW_Updt_Dttm' DEFAULT NULL  COMPRESS ,
           DW_Cur_In BYTEINT TITLE 'DW_Cur_In' NOT NULL DEFAULT 1  COMPRESS (0 ,1
     ))
     UNIQUE PRIMARY INDEX ( Prod_Id );

Gabriel Issah
Infrastructure Oversight Analyst
LTCP HIA MCITP Information Technology
Senior Health Insurance of Pennsylvania



     
  <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