11 Replies Latest reply: Sep 10, 2008 2:18 AM by Nicolas.Gasparotto RSS

    ORA-06552/3 PROBLEM (Must be missing something...)

    591737
      The table HISTORY exists
      The sequence SEQ_PK_HISTORY EXISTS

      So why is the following failing:
      create or replace trigger "BI_HISTORY"
      BEFORE INSERT ON "HISTORY"
      FOR EACH ROW
      BEGIN
      IF :NEW."PK_ID" IS NULL THEN
      SELECT "SEQ_PK_HISTORY".NEXTVAL INTO :NEW."PK_ID" FROM DUAL;
      END IF;
      END;


      I get an error on line 2 at the table name followed by
      ORA-06552: PL/SQL: COMPILATION UNIT ANALYSIS TERMINATED
      ORA-06553: PLS-320: THE DECLARATION OF THIS TYPE OF THIS EXPRESSION IS INCOMPLETE OR MALFORMED.