Re: Inventory Table for Period End Balances
USER FOLLOWING QUERY:
MORE TABLES ARE:
IV00101
IV00102
IV10200
IV10201
IV30300
--------------------------------------------------------------------------------------------------------------------------------
SELECT M.ITEMNMBR ,
IV.ITEMDESC,
IV.ITMCLSCD Class,
M.TRXLOCTN Location,
sum(M.QTYRECVD - M.QTYSOLD) Quantity,
sum(M.UNITCOST * ( M.QTYRECVD - M.QTYSOLD )) TotalCost,
sum(M.UNITCOST * ( M.QTYRECVD - M.QTYSOLD )) / sum(M.QTYRECVD
- M.QTYSOLD) AvgUCost
FROM IV10200 M
INNER JOIN IV00101 IV ON IV.ITEMNMBR = M.ITEMNMBR
WHERE M.QTYRECVD <> M.QTYSOLD
GROUP BY M.ITEMNMBR,
M.TRXLOCTN,
IV.ITEMDESC,
IV.ITMCLSCD