Re: Foreign Key Integrity Constraints
Date: 1996/09/12
Message-ID: <519ue8$rfs_at_nr1.ottawa.istar.net>#1/1
Carol KIlner wrote:
> (2) I disable all constraints and load the table using SQL*LDR
>
> (3) I enable the constraints and I get the following error message:
> alter table order_header
> *
> ERROR at line 1:
> ORA-02298: cannot enable constraint (SALESSYS.FK_CUSTOMER_CD) - parent keys not
> found
>
> Should these records that violate the constraint no be moved to the exceptions
> table?
>
> Any help would be much appreciated.
>
> Thanks,
> Carol Kilner
> BASF Canada
> kilnerc_at_basf-corp.com
You need to execute the exceptions clause at the time that the FK is *being* created. It isn't something that is kept with the constraint definition, so when you created it on an empty table it stored nothing in the exceptions table. Specify the exceptions clause when you enable your constraint.
-- R. Wayne Linton, I.S.P. Database & Systems Management Shell Canada Ltd.Received on Thu Sep 12 1996 - 00:00:00 CEST