This commit is contained in:
parent
8dea9598e8
commit
df6de7e74c
|
@ -20,12 +20,11 @@ BEGIN
|
|||
SELECT itemFk, warehouseFk, vDated, 0
|
||||
FROM (SELECT DISTINCT itemFk, warehouseFk FROM tmp.itemCalc) t2
|
||||
) t1
|
||||
GROUP BY itemFk, warehouseFk, dated
|
||||
ORDER BY itemFk, warehouseFk, dated;
|
||||
GROUP BY itemFk, warehouseFk, dated;
|
||||
|
||||
SET @lastItemFk := 0;
|
||||
SET @lastWareHouseFk := 0;
|
||||
SET @lastQuantity := 0;
|
||||
SET @lastItemFk = 0;
|
||||
SET @lastWareHouseFk = 0;
|
||||
SET @lastQuantity = 0;
|
||||
|
||||
CREATE OR REPLACE TEMPORARY TABLE tmp.itemAtp
|
||||
(INDEX (itemFk, wareHouseFk))
|
||||
|
@ -40,6 +39,8 @@ BEGIN
|
|||
@lastItemFk := itemFk,
|
||||
@lastWareHouseFk := wareHouseFk
|
||||
FROM tItemOrdered
|
||||
ORDER BY itemFk, warehouseFk, dated
|
||||
LIMIT 10000000000000000000
|
||||
)sub
|
||||
GROUP BY itemFk, wareHouseFk;
|
||||
|
||||
|
|
Loading…
Reference in New Issue