Skip to Content

Slow Moving Stock Query

Nov 21, 2017 at 07:57 AM


avatar image

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers