on 11-21-2017 7:57 AM
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
User | Count |
---|---|
110 | |
12 | |
11 | |
6 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.