salix/db/routines/vn/procedures/workerTimeControlSOWP.sql

14 lines
338 B
MySQL
Raw Normal View History

DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`workerTimeControlSOWP`(IN vUserFk INT, IN vDated DATE)
BEGIN
SET @order := 0;
UPDATE workerTimeControl
SET `order` = @order := @order + 1
WHERE vUserFk =userFk
AND vDated = DATE(timed)
ORDER BY timed;
END$$
DELIMITER ;