Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 3576

Re: Query: Last actual purchase cost of item number

$
0
0

Hi,

 

You can try:

 

SELECT  T0.[ItemCode], T0.[Dscription], T0.Price 'Last Actual Purchase Price ' FROM PCH1 T0

JOIN

(SELECT  T1.[ItemCode], MAX(T1.Docentry) 'DocEntry'

FROM PCH1 T1

Group By T1.[ItemCode]) T ON T.DocEntry=T0.DocEntry AND T.ItemCode=T0.ItemCode

ORDER BY T0.ItemCode

 

Thanks,

Gordon


Viewing all articles
Browse latest Browse all 3576

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>