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

Re: Query for stock purchased

$
0
0

Hi Avijit Mondal

 

Try this

 

SELECT T0.[ItemCode], T0.[WhsCode], T0.[OnHand] AS OnHand, T0.[AvgPrice] * T0.[OnHand] AS 'Stock Value', T1.LastPurDat

FROM OITW T0 

INNER JOIN OITM T1 ON T0.ItemCode = T1.ItemCode

WHERE T0.[OnHand] >0 AND  T1.[LastPurDat] >= '[%0]' 

GROUP BY T0.[ItemCode], T0.[OnHand], T0.[AvgPrice] ,T0.[OnHand],T0.[WhsCode], T1.LastPurDat order by T0.[ItemCode], T0.[WhsCode]

 

Regards

Kennedy


Viewing all articles
Browse latest Browse all 9236

Trending Articles



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