salix/db/routines/sage/triggers/movConta_BEFORE_UPDATE.sql

11 lines
282 B
MySQL
Raw Normal View History

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 ;