3/30/08
Inventory Levels
SELECT TOP 100 PERCENT dbo.IV00101.ITMCLSCD, dbo.IV00101.ITEMDESC, dbo.IV00101.ITEMNMBR, dbo.IV40201.BASEUOFM, dbo.IV00101.ITMGEDSC, dbo.IV00102.LOCNCODE, dbo.IV00102.QTYONHND, dbo.IV00102.ATYALLOC, dbo.IV00102.QTYCOMTD, ISNULL(dbo.IV00102.QTYONHND, 0.00000) - ISNULL(dbo.IV00102.ATYALLOC, 0.00000) - ISNULL(dbo.IV00102.QTYCOMTD, 0.00000) AS QTYAVAIL, dbo.IV00101.STNDCOST * dbo.IV00102.QTYONHND AS VALUEQTYONHND, dbo.IV00101.STNDCOST * dbo.IV00102.ATYALLOC AS VALUEATYALLOC, dbo.IV00101.STNDCOST * dbo.IV00102.QTYCOMTD AS VALUEQTYCOMTD, dbo.IV00101.STNDCOST * (ISNULL(dbo.IV00102.QTYONHND, 0.00000) - ISNULL(dbo.IV00102.ATYALLOC, 0.00000) - ISNULL(dbo.IV00102.QTYCOMTD, 0.00000)) AS VALUEQTYAVAILFROM dbo.IV00101 LEFT OUTER JOIN dbo.IV00102 ON dbo.IV00101.ITEMNMBR = dbo.IV00102.ITEMNMBR LEFT OUTER JOIN dbo.IV40201 ON dbo.IV00101.UOMSCHDL = dbo.IV40201.UOMSCHDLWHERE (dbo.IV00102.RCRDTYPE = 2) AND (dbo.IV00102.QTYONHND + dbo.IV00102.ATYALLOC + dbo.IV00102.QTYCOMTD <> 0)ORDER BY dbo.IV00101.STNDCOST * (ISNULL(dbo.IV00102.QTYONHND, 0.00000) - ISNULL(dbo.IV00102.ATYALLOC, 0.00000) - ISNULL(dbo.IV00102.QTYCOMTD, 0.00000)) DESC
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment