CREATE OR REPLACE TRIGGER USR_ATU_PRAZOFORNEXPEDFIL_NGD
BEFORE DELETE OR INSERT OR UPDATE OF QTDIASPRAZOEXPED
ON PRAZOFORNEXPEDFIL  FOR EACH ROW
BEGIN
   IF DELETING THEN
      UPDATE FORNECEDOR
         SET USR_NGD_INTEGRADO_1 = 'N'
       WHERE CDFORNECED   = :OLD.CDFORNECED;
   ELSE
      :NEW.USR_NGD_INTEGRADO := 'N';
   END IF;
END;
/

-- VERSAO --
BEGIN ATUVEROBJ('USR_ATU_MINFORNREG_NGD','6.37.015'); END;
/
