-
Please try to answer me ASAP. Thanks in advance
I am getting this error when I try to enable the constraint
ORA-02298: cannot enable (MIS.MENT_COUNTY_FK) - parent keys not found.
I saw the Oracle error message Action as Make sure that the table has no orphaned child records before issuing an ALTER TABLE ENABLE CONSTRAINT command.
IS there any easy method to find the dependent child records from the tables.
Admala
-
post your line of script please.
most likely the oposing table/column you are referencing doesn't match the other table/column ...
-
The following statement I am giving
Alter table MENT_PROP_LINK Enable constraint MENT_COUNTY_FK ;
MIS.MENT_COUNTY_FK
-
To find employees without department:
SELECT e.*
FROM emp e
WHERE NOT EXISTS
(
SELECT 1
FROM dept d
WHERE d.deptno = e.deptno
)
-
ah ...
ok, you need to find out what table and column the constraint is referencing and then you need to verify the data in each. Basically, the error is saying that data does not exist in the referenced table that exists in the table with the constraint.
If you need help doing this lemme know.
- Magnus