When trying to compile a trigger you receive following error:
ORA-04095 trigger "string" already exists on another table, cannot replace it
Recreate the trigger and it will compile successfully.
drop trigger TEST.BI_TRG;
create or replace
TRIGGER
BI_TRG
BEFORE INSERT ON BI
REFERENCING
NEW AS NEW
OLD AS OLD
FOR EACH ROW
DECLARE
REF_DATE DATE := to_date('1-JAN-2000 00:00:00','DD-MON-YYYY HH24:MI:SS');
BEGIN
:NEW.DATETIME_ID := mod(trunc(months_between(trunc(:NEW.STARTDATETIME), REF_DATE)), 2 + 3);
END;
ORA-04095 trigger "string" already exists on another table, cannot replace it
Recreate the trigger and it will compile successfully.
drop trigger TEST.BI_TRG;
create or replace
TRIGGER
BI_TRG
BEFORE INSERT ON BI
REFERENCING
NEW AS NEW
OLD AS OLD
FOR EACH ROW
DECLARE
REF_DATE DATE := to_date('1-JAN-2000 00:00:00','DD-MON-YYYY HH24:MI:SS');
BEGIN
:NEW.DATETIME_ID := mod(trunc(months_between(trunc(:NEW.STARTDATETIME), REF_DATE)), 2 + 3);
END;
No comments:
Post a Comment