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

Home -> Community -> Usenet -> c.d.o.misc -> a enable constrain problem

a enable constrain problem

From: Erin Gu <ygu_at_lucent.com>
Date: Mon, 30 Sep 2002 16:34:13 -0400
Message-ID: <anacg7$e61@netnews.proxy.lucent.com>


Hi,
I am trying to figure out a way to validate data from a direct path load. For example, the primary key constrain, I have to disable it in order to use the direct load method, then when I try to enable it, I got error like this: ORA-02437: cannot validate (PRDMDEV.ERIN1_PK) - primary key violated

I know this failed because there are some deplicated entries in the table. My real question is is there a way to let the database "kick-out" the duplicated entries, and only keep the valid ones? I searched the web, someone suggested something like this:

SQL> alter table erin1 enable validate constraint erin1_pk EXCEPTIONS INTO erin1_exp;
alter table erin1 enable validate constraint erin1_pk EXCEPTIONS INTO erin1_exp
*
ERROR at line 1:
ORA-00604: error occurred at recursive SQL level 1 ORA-00913: too many values

But it seems doesn't work. The erin1_exp is another table with same schema as erin1. Can someone tell me what is wrong with this alter table command?

Thanks in advance!

Erin Received on Mon Sep 30 2002 - 15:34:13 CDT

Original text of this message

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