create or replace trigger RF_TEST_SHIPTO
before delete on SHIPTO
for each row
begin
if :old.STSTAT <>'P'
THEN
insert into TEST_SHIPTO select * from shipto;
end if;
end ;
/
The best way to handle these situations is to create a package. Within the package, create a table of records and two triggers: a row trigger and an "after" statement trigger. Record the data being deleted into the table of records during the row trigger processing then manipulate the database as needed in the statement trigger using the table of records. Thus no table access occurs during mutation.
Bookmarks