salix/db/routines/vn/procedures/timeBusiness_calculateByWor...

22 lines
519 B
MySQL
Raw Normal View History

DELIMITER $$
2024-08-20 08:06:10 +00:00
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`timeBusiness_calculateByWorker`(vWorkerFk INT, vDatedFrom DATETIME, vDatedTo DATETIME)
BEGIN
/**
* @param vWorkerFk
* @param vDatedFrom Fecha desde
* @param vDatedTo Fecha hasta
*/
CREATE OR REPLACE TEMPORARY TABLE tmp.`user`
SELECT w.id userFk
FROM worker w
WHERE w.id = vWorkerFk;
CALL timeBusiness_calculate(vDatedFrom, vDatedTo);
DROP TEMPORARY TABLE tmp.`user`;
END$$
DELIMITER ;