All Forums Database
04 Nov 2013
3976: Incorrect referential constraint definition

ALTER TABLE XXX
 ADD CONSTRAINT R_374 FOREIGN KEY (QuarterPeriodNum) REFERENCES WITH NO CHECK OPTION YYY (QuarterPeriodNum)
[Teradata][ODBC Teradata Driver][Teradata Database] Incorrect referential constraint definition.
Execution Failed!
ALTER TABLE Failed. 3976:  Incorrect referential constraint definition.
Can some body help me why I am getting this error.

04 Nov 2013

I am using TD 13.10 version, please help...

VandeBergB 182 posts Joined 09/06
04 Nov 2013

Please include the DDL of the parent and child tables you are attempting to build the reference for.

Some drink from the fountain of knowledge, others just gargle.

M.Saeed Khurram 544 posts Joined 09/12
05 Nov 2013

Hi,
Can you please share the parent table definition as well. As the error might be due to the definition of QuarterPeriodNum column. 
This column must be defined as UNIQUE and NOT NULL in order to be referenced.
 

Khurram

You must sign in to leave a comment.