on 10-19-2018 1:42 PM
I've made a query to display all items transferred according to some document numbers we're interested in investigating. How can we modify the query to group the items by name with a total count?
This is what I have so far:
SELECT T1.[Quantity], T1.[ItemCode], T2.[ItemName], T1.[WhsCode] FROM OWTR T0 INNER JOIN WTR1 T1 ON T0.[DocEntry] = T1.[DocEntry] INNER JOIN OITM T2 ON T1.[ItemCode] = T2.[ItemCode] WHERE T0.[DocNum] IN (13,23,29,49,55)
Any help is appreciated!
SELECT SUM(T1.[Quantity]), T1.[ItemCode], T2.[ItemName], T1.[WhsCode] FROM OWTR T0 INNER JOIN WTR1 T1 ON T0.[DocEntry] = T1.[DocEntry] INNER JOIN OITM T2 ON T1.[ItemCode] = T2.[ItemCode] WHERE T0.[DocNum] IN (13,23,29,49,55) GROUP BY
T1.[ItemCode], T2.[ItemName], T1.[WhsCode]You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Hrvoje. That worked.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
103 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.