Constraint
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 5 of 5

Thread: Constraint

  1. #1
    Join Date
    Nov 2000
    Posts
    34

    Angry

    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

  2. #2
    Join Date
    May 2000
    Location
    Portsmouth, NH, USA
    Posts
    378

    Talking


    post your line of script please.
    most likely the oposing table/column you are referencing doesn't match the other table/column ...

  3. #3
    Join Date
    Nov 2000
    Posts
    34
    The following statement I am giving

    Alter table MENT_PROP_LINK Enable constraint MENT_COUNTY_FK ;
    MIS.MENT_COUNTY_FK

  4. #4
    Join Date
    Jul 2000
    Posts
    296
    To find employees without department:

    SELECT e.*
    FROM emp e
    WHERE NOT EXISTS
    (
    SELECT 1
    FROM dept d
    WHERE d.deptno = e.deptno
    )

  5. #5
    Join Date
    May 2000
    Location
    Portsmouth, NH, USA
    Posts
    378

    Thumbs up 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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width