Skip to Content
avatar image
Former Member

Slow Moving Stock Query

Good Morning Experts,

how could i use the below to also include the last time an item was used in production? Also only showing items that havent sold or been used in production since the end of 2014?

SELECT T0.[ItemCode], T1.[ItmsGrpNam], T0.[ItemName], T0.[LastPurDat], T0.[OnHand], T0.[BuyUnitMsr] as 'uom', T0.[LastPurPrc], T0.[OnHand]*T0.[LastPurPrc] as 'Est Stock Value' FROM [dbo].[OITM] T0 INNER JOIN [dbo].[OITB] T1 ON T0.[ItmsGrpCod] = T1.[ItmsGrpCod] WHERE T0.[OnHand] >0 AND T1.ItmsGrpNam <> 'SP001-Spare Parts' and datediff(day, T0.[LastPurDat],getdate()) > 90

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

0 Answers