Even if it is compiling OK, it will give the mutating error. You will not achieve your objective of archiving deleted records unless you reference old (record) with a keyword and insert it into the zclient table as explained by Soni.
My advise is create trigger as given by PSoni and then see if objective is met.
This is how archiving of deleted data works around here.
CREATE OR REPLACE TRIGGER del_trg
after delete on prod.tbl
referencing old as old
for each row
insert into arc.tbl (
Hello all, thanks for your comments to date... but I am still doing something wrong? My trigger is:
CREATE OR REPLACE TRIGGER "GSUSER"."XBENEFIT" BEFORE DELETE ON "GSUSER"."BENEFIT"
REFERENCING OLD AS old NEW AS new
FOR EACH ROW BEGIN
INSERT INTO xBenefit (
I'm getting a compile error on this... "Identifier 'OLD.ENEFIT' must be declared." Could anyone suggest what I've done wrong please?
Hugen Enterprises Pty Ltd