Home » SQL & PL/SQL » SQL & PL/SQL » ORA-02298: cannot validate (PL_REM_FK_ES_EMP) - parent keys not found
ORA-02298: cannot validate (PL_REM_FK_ES_EMP) - parent keys not found [message #302238] Mon, 25 February 2008 00:44 Go to next message
jeer
Messages: 37
Registered: February 2008
Location: pakistan
Member
hi

I disabled some constraints. But now, when I try to enable them then I get the error:

ORA-02298: cannot validate (PL_REM_FK_ES_EMP) - parent keys not found.

please guide me to resolve this problem.

Re: ORA-02298: cannot validate (PL_REM_FK_ES_EMP) - parent keys not found [message #302243 is a reply to message #302238] Mon, 25 February 2008 00:54 Go to previous message
Michel Cadot
Messages: 64603
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Find all rows that have not the parent key and delete them or do what you want with them. For instance, "select ... where not exists ..." or "where not in ..."

You can also use an exception table when you enable the constraint.
http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_3001.htm#i2183600
http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_3001.htm#i2185677
http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_3001.htm#i2084815

Regards
Michel
Previous Topic: table deadlock
Next Topic: How do I fire trigger with sequnce value condition?
Goto Forum:
  


Current Time: Thu Mar 23 21:22:36 CDT 2017

Total time taken to generate the page: 0.13175 seconds