CREATE OR REPLACE TRIGGER DTULTATU_CONFTELACAIXA_CASCADE
BEFORE INSERT OR UPDATE OR DELETE
ON CONFTELACAIXA FOR EACH ROW
BEGIN
   IF INSERTING OR UPDATING THEN
      UPDATE CONFTELA
         SET DTULTATUCFTE = SYSDATE
       WHERE NRCONFTELA = :NEW.NRCONFTELA
         AND CDFILIAL = :NEW.CDFILIAL
         AND DTINIVIGENCIA = :NEW.DTINIVIGENCIA;

      UPDATE ITMENUCONFTE
         SET DTULTATUITCT = SYSDATE
       WHERE  CDFILIAL   = :NEW.CDFILIAL
         AND  NRCONFTELA = :NEW.NRCONFTELA
         AND DTINIVIGENCIA = :NEW.DTINIVIGENCIA;

      UPDATE SUGESTAOVENDA
     SET DTULTATU = SYSDATE
       WHERE CDFILIAL = :NEW.CDFILIAL
         AND NRCONFTELA = :NEW.NRCONFTELA;

   END IF;
END;
/