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

Re: Batch quantities do not match Item quantities

$
0
0

Hi,

 

Try this:

 

SELECT T2.[ItemCode], T2.[WhsCode],sum(T1.[Quantity]), T2.[OnHand], sum( T1.[Quantity]) - T2.[OnHand] as diff FROM OITM T0  INNER JOIN OIBT T1 ON T0.ItemCode = T1.ItemCode INNER JOIN OITW T2 ON T0.ItemCode = T2.ItemCode WHERE T1.[WhsCode] =  T2.[WhsCode] GROUP BY T2.[ItemCode], T2.[WhsCode],T2.[OnHand]

 

Let me know the query result.

 

Thanks & Regards,

Nagarajan


Viewing all articles
Browse latest Browse all 9164

Trending Articles