語法, 如下 :
語法
SELECT NVL(SUM(MMT.PRIMARY_QUANTITY), 0)*-1
FROM MTL_MATERIAL_TRANSACTIONS MMT
WHERE MMT.ORGANIZATION_ID = &ORGANIZATION_ID
AND MMT.INVENTORY_ITEM_ID = &INVENTORY_ITEM_ID
AND MMT.TRANSACTION_DATE BETWEEN TO_DATE('&START_DATE','YYYYMMDD') and (TO_DATE('&END_DATE','YYYYMMDD')+ 1)
AND MMT.TRANSACTION_SOURCE_TYPE_ID = 2
AND MMT.TRANSACTION_ACTION_ID <> 28;