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

11 lines
281 B
SQL

DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `sage`.`movConta_beforeUpdate`
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 ;