Merge pull request 'refactor: refs #7886 Deleted proc buy_getVolumeByAgency' (!2965) from 7886-buy_getVolumeByAgency into dev
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
Reviewed-on: #2965 Reviewed-by: Carlos Andrés <carlosap@verdnatura.es>
This commit is contained in:
commit
0c4637030c
|
@ -1,20 +0,0 @@
|
|||
DELIMITER $$
|
||||
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`buy_getVolumeByAgency`(vDated DATE, vAgencyFk INT)
|
||||
BEGIN
|
||||
|
||||
DROP TEMPORARY TABLE IF EXISTS tmp.buy;
|
||||
CREATE TEMPORARY TABLE tmp.buy (buyFk INT NOT NULL, PRIMARY KEY (buyFk)) ENGINE = MEMORY;
|
||||
|
||||
INSERT INTO tmp.buy
|
||||
SELECT b.id
|
||||
FROM buy b
|
||||
JOIN entry e ON e.id = b.entryFk
|
||||
JOIN travel t ON t.id = e.travelFk
|
||||
WHERE t.landed = vDated
|
||||
AND t.agencyModeFk IN (0, vAgencyFk);
|
||||
|
||||
CALL buy_getVolume();
|
||||
DROP TEMPORARY TABLE tmp.buy;
|
||||
|
||||
END$$
|
||||
DELIMITER ;
|
Loading…
Reference in New Issue