SELECT sum(mmt.primary_quantity)
FROM apps.mtl_transaction_types mtt,
apps.mtl_material_transactions mmt,
apps.mtl_system_items msi
WHERE mtt.transaction_type_id = mmt.transaction_type_id
AND mmt.organization_id = msi.organization_id
AND mmt.inventory_item_id = 185144--msi.inventory_item_id
AND mmt.organization_id = 110--x.organization_id
AND trunc (mmt.transaction_date) <= TRUNC (:p_date)
FROM apps.mtl_transaction_types mtt,
apps.mtl_material_transactions mmt,
apps.mtl_system_items msi
WHERE mtt.transaction_type_id = mmt.transaction_type_id
AND mmt.organization_id = msi.organization_id
AND mmt.inventory_item_id = 185144--msi.inventory_item_id
AND mmt.organization_id = 110--x.organization_id
AND trunc (mmt.transaction_date) <= TRUNC (:p_date)
No comments:
Post a Comment