CREATE OR REPLACE TRIGGER DTULTATU_CONFTELA_CASCADE
BEFORE INSERT OR UPDATE OR DELETE
ON CONFTELA FOR EACH ROW
BEGIN
   IF INSERTING THEN
      :NEW.DTULTATUCFTE := SYSDATE;
   END IF;
   IF UPDATING THEN
      :NEW.DTULTATUCFTE := SYSDATE;
   END IF;
   IF DELETING THEN
      INSERT INTO DELETECACHE (NMTABLECACHE, CDFILICACHE, DSKEYCACHE, DTULTATUCACH)
                       VALUES ('CONFTELA',:OLD.CDFILIAL, 'CDFILIAL='||:OLD.CDFILIAL||';NRCONFTELA='||:OLD.NRCONFTELA||';', SYSDATE);
   END IF;
END;
/