fix: refs #7779 refactor collection
gitea/salix/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Carlos Andrés 2024-09-26 12:48:18 +02:00
parent eb2a30f0d9
commit 0851c6fb97
1 changed files with 2 additions and 2 deletions

View File

@ -245,7 +245,7 @@ BEGIN
SELECT wagon INTO vFreeWagonFk
FROM tTrain
GROUP BY wagon
HAVING SUM(IFNULL(ticketFk, 0)) = 0
HAVING COUNT(ticketFk) = 0
ORDER BY wagon
LIMIT 1;
@ -262,7 +262,7 @@ BEGIN
JOIN (SELECT wagon
FROM tTrain
GROUP BY wagon
HAVING SUM(IFNULL(ticketFk, 0)) = 0
HAVING COUNT(ticketFk) = 0
) sub ON sub.wagon = tt.wagon;
END IF;
END IF;