2 Replies Latest reply: Dec 8, 2012 11:43 AM by Victor Armbrust RSS

    Error in SQL...

    975743
      Whiel running this query


      ALTER TABLE "WMSA"."L_OUTPUT_DTL" ADD CONSTRAINT "L_OUTPUT_DTL_FKB" FOREIGN KEY ("OP_SEQ_NUM", "DUM_KEY")
      REFERENCES "WMSA"."OUTPUT_DTL" ("OP_SEQ_NUM", "DUM_KEY") ON DELETE CASCADE ENABLE;


      Getting following error


      SQL> ALTER TABLE "WMSA"."L_OUTPUT_DTL" ADD CONSTRAINT "L_OUTPUT_DTL_FKB" FOREIGN KEY ("OP_SEQ_NUM", "DUM_KEY")
      REFERENCES "WMSA"."OUTPUT_DTL" ("OP_SEQ_NUM", "DUM_KEY") ON DELETE CASCADE ENABLE; 2
      ALTER TABLE "WMSA"."L_OUTPUT_DTL" ADD CONSTRAINT "L_OUTPUT_DTL_FKB" FOREIGN KEY ("OP_SEQ_NUM", "DUM_KEY")
      *
      ERROR at line 1:
      ORA-02298: cannot validate (WMSA.L_OUTPUT_DTL_FKB) - parent keys not found