• Try to run queries like this:

    select * from FK_Table F

    WHERE NOT EXISTS (

    select * from PK_Table P

    where P.PK_Column1 = F.FK_Column1 and P.PK_Column2 = F.FK_Column2

    It should give you the entries (so called "orhaned records") in "FK_Table" which prevent you from creating the FK.

    Inspect them and decide what you can do about it:

    - delete orhaned records from FK_Table;

    - add missing kes to PK_Table;

    - reconsider the FK.

    _____________
    Code for TallyGenerator