Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: ORA-02298, cannot enable constraint

Re: ORA-02298, cannot enable constraint

From: Igor V. Podolsky <igoryok_at_soft-review.kiev.ua>
Date: Mon, 7 Feb 2000 14:07:45 +0200
Message-ID: <AAkKhduS80w@soft-review.kiev.ua>


Joe <joe_at_vulcan.achq.dnd.ca> wrote in message news:NNmn4.3468$a27.116102_at_news1.rdc1.mb.home.com...
> I have gotten the subject message and am stuck.
> The Cause is because of orphaned records in the table
> The Action to take is to make sure there are no orphaned records in the
> table before issuing the command.
>
> My questions are, which table are the orphaned records in (the one
pointing
> from or to), and how do you find orphaned records,?

Orphaned records are in child table (the one pointing from, by Your words). Message You got means that there is child records without corresponding parent ones. You can find them with something like following:

select * from <child table> where (<foreign key columns>) not in (select <primary key columns> from <parent table>)

--
Is There A God Or Any Kind Of Justice Under The Sky... (Queen'91)

Igor V. Podolsky (igoryok_at_soft-review.kiev.ua) Received on Mon Feb 07 2000 - 06:07:45 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US