on 11-20-2017 6:12 PM
query-output.jpg
Hi Gurus,
Below query is giving me correct out on quantity but item code and item description is repeated. i want to see one time code having Total PO qty and what in stock.
Can you please advise what's wrong with this query.
Thanks
Shahzad Ahmed
SELECT
T1.[ItemCode],
T1.[Dscription],
sum(T1.[Quantity]) as 'PO QTY',
T3.[OnHand]
FROM
ORDR T0 INNER JOIN RDR1 T1 ON T0.[DocEntry] = T1.[DocEntry]
INNER JOIN OITM T2 ON T1.[ItemCode] = T2.[ItemCode]
INNER JOIN OITW T3 ON T2.[ItemCode] = T3.[ItemCode]
WHERE
T0.[CardCode] = 'c00192' and
T0.[NumAtCard] Like '818276%%' and
T3.[WhsCode] = '161'
GROUP BY T1.[ItemCode], T1.[Dscription], T1.[Quantity], T3.[OnHand]
User | Count |
---|---|
89 | |
7 | |
6 | |
3 | |
3 | |
3 | |
3 | |
3 | |
3 | |
2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.