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

20 lines
428 B
SQL

DELIMITER $$
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`timeBusiness_calculateAll`(vDatedFrom DATETIME, vDatedTo DATETIME)
BEGIN
/**
* @param vDatedFrom Fecha desde
* @param vDatedTo Fecha hasta
*/
CREATE OR REPLACE TEMPORARY TABLE tmp.`user`
SELECT w.id userFk
FROM vn.worker w;
CALL vn.timeBusiness_calculate(vDatedFrom, vDatedTo);
DROP TEMPORARY TABLE tmp.`user`;
END$$
DELIMITER ;