Re: SOS:ora-02298:parent keys not found

From: elk <Andy_at_entasuru.demon.co.uk>
Date: Tue, 4 Aug 1998 00:00:24 +0100
Message-ID: <902184925.21409.0.nnrp-05.9e982820_at_news.demon.co.uk>


The possible problem you have is that while the constraint was disabled data was inserted in table2 ( a child record ) with no parent in table1. Trying to enable a constraint in this situation will cause the error as integrity cannot be verified ( as long as table1 is not empty ). Option1: check your data and remove child records from table2 with no parent in table1 the enable constraint.
Option2: remove all records from both tables and enable the constraint.

Hope this helps.

Violin wrote in message <35c2c8a3.29143882_at_172.16.7.252>...
>Hello,I have an urgent problem.PLEASE HELP ME!
>
>I have 2 tables:
>
>TABLE1 TABLE2
>--------------------------------------- ---------------------------
>accept_no char(8) ord_no char(8)
>accept_num char(3) ord_num char(3)
>ord_no char(8) ord_qty number(11,4)
>ord_num char(3) ord_date char(8)
>accept_mark char(1) ord_mark char(1)
>chk_qty number(11,4)
>
>
>The primary key of TABLE1 is : accept_no+accept_num
>The primary key of TABLE2 is :ord_no+ord_num
>
>And TABLE1 has a foreign key (ord_no,ord_num) reference
>TABLE2 (ord_no,ord_num)
>
>But when I alter table add the constraint,there is an error:
>ORA-02298:cannot enable-parent keys not found.
>Why??
>Please Help me,Thank you so............... much!!!
>Please Cc to : violin.hsiao_at_mail.pouchen.com.tw
Received on Tue Aug 04 1998 - 01:00:24 CEST

Original text of this message