DELIMITER $$ CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `sage`.`movConta_BEFORE_UPDATE` BEFORE UPDATE ON `movConta` FOR EACH ROW BEGIN IF NEW.enlazadoSage = TRUE THEN UPDATE vn.XDiario SET enlazadoSage = TRUE WHERE ASIEN = NEW.Asiento; END IF; END$$ DELIMITER ;