Re: Adding Ref. Integrity

From: Simon Thompson <scthomp_at_ibm.net>
Date: 1995/07/23
Message-ID: <3usi22$7ut_at_news-s01.ny.us.ibm.net>#1/1


In message <3uivok$ue1_at_caesar.ultra.net> - rblizard_at_bb.cmcsys.com (Bob Blizard)  writes:
:>>I am tring to add referential integrity to an already populated table. I keep
:>>getting an ORA2294 error - parent keys do not exist.
:>
:>What you have looks ok. Have you tried adding the
:>'EXCEPTIONS INTO exceptions_table' clause to your constraint?

Hadn't noticed this option. Must remember it. Thanks.

:>This
:>will at least tell you which rows it is choking on. Also, I presume
:>you are being sure that the constraint name is unique? (This would
:>give you another error, though)

I loaded them via an insert (in a PL/SQL [rpgram so I could commit every 200 records). All the records loaded fine!

It has been suggested that I check the Parent tables index.

Thanks.

+---------------------------
| Simon Thompson

| Christchurch
| New Zealand Received on Sun Jul 23 1995 - 00:00:00 CEST

Original text of this message