Free for PREMIUM members
SELECT t.PART_ID, t.TRANSACTION_DATE , t.CLASS
FROM dbo.INVENTORY_TRANS t
WHERE t.PART_ID IS NOT NULL
AND t.TRANSACTION_DATE = ( SELECT MAX(i.TRANSACTION_DATE) FROM dbo.INVENTORY_TRANS i WHERE i.PART_ID = t.PART_ID )
ORDER BY PART_ID
Open in new window
We value your feedback.
Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!
select t.* from dbo.inventory_trans t
(select part_id, transaction_date, transaction_id, row_number() over (partition by part_id order by transaction_date desc, transaction_id desc) rn
from dbo. inventory_trans
where class in ('I','R')
on t.transaction_id = tm.transaction_id
Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.