CREATE OR REPLACE TRIGGER ATUA_MAPA_CAPALOTE
AFTER DELETE
ON CAPALOTE FOR EACH ROW
BEGIN
    UPDATE MAPAAPURAC
       SET CDLOTE  = NULL
     WHERE CDEMPRESA  = :OLD.CDEMPRESA
       AND CDLOTE     = :OLD.CDLOTE;
END;
/

-- VERSAO --
BEGIN ATUVEROBJ('ATUA_MAPA_CAPALOTE','0.00.000'); END;
/