refactor: refs #7681 Changes
gitea/salix/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Guillermo Bonet 2024-07-10 13:31:48 +02:00
parent 96d2bacb3d
commit a2f2ed743d
1 changed files with 0 additions and 4 deletions

View File

@ -8,16 +8,12 @@ BEGIN
*
* @param vSelf Id ruta
*/
CREATE OR REPLACE TEMPORARY TABLE tRouteVolume
ENGINE = MEMORY
SELECT IFNULL(SUM(volume), 0) volume
FROM saleVolume
WHERE routeFk = vSelf;
-- Hago el INTO para que no de error en los triggers
SELECT id INTO vSelf FROM `route` WHERE id = vSelf FOR UPDATE;
UPDATE `route`
SET m3 = (SELECT volume FROM tRouteVolume)
WHERE id = vSelf;