This commit is contained in:
parent
eb2a30f0d9
commit
0851c6fb97
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue