Home Page for the TeradataForum
 
https:

Archives of the TeradataForum

Message Posted: Mon, 10 Nov 2008 @ 10:39:48 GMT


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


Subj:   Re: Error while modifying constraint
 
From:   Jeff Jones

Hi Neha,

I think Mike has it right, you need to remove the table level restraint and redefine it as a column level restraint.

Using the alter table statements Mike provided you will change your table from this:

     CREATE SET TABLE MANUFACTURING.employees ,NO FALLBACK ,
             NO BEFORE JOURNAL,
             NO AFTER JOURNAL,
             CHECKSUM = DEFAULT
             (
              EmpNo SMALLINT NOT NULL,
              Name VARCHAR(12) CHARACTER SET LATIN NOT CASESPECIFIC,
              DeptNo SMALLINT,
              CONSTRAINT employees_Check_deptno CHECK ( deptno >  10  ))
        PRIMARY INDEX ( EmpNo )
        INDEX ( Name );

To be this:

     CREATE SET TABLE MANUFACTURING.employees ,NO FALLBACK ,
             NO BEFORE JOURNAL,
             NO AFTER JOURNAL,
             CHECKSUM = DEFAULT
             (
              EmpNo SMALLINT NOT NULL,
              Name VARCHAR(12) CHARACTER SET LATIN NOT CASESPECIFIC,
              DeptNo SMALLINT CHECK (deptno > 10)
              )
        PRIMARY INDEX ( EmpNo )
        INDEX ( Name );

That puts the constraint at column level so to can modify it using alter table to your hearts content.


Hope this helps

Jeff



     
  <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: 28 Jun 2020