on 01-13-2017 12:33 PM
Hi All,
When i'm raising the sale order, It's showing overall onhand in instock column. But i want to know the Sum of four warehouse onhand. I have use the below FMS, but it's not showing the exact figure.
SELECT SUM (T0.[OnHand]) FROM OITW T0 WHERE T0.[WhsCode] = 'WH07' or T0.[WhsCode] = 'WH08' or T0.[WhsCode] = 'WH04' or T0.[WhsCode] = 'WH05' and T0.ItemCode = $[$38.1.0] GROUP BY T0.ItemCode
Cheers!
Hi,
This is because of the ORs that you have used.
Please try this:
SELECT SUM(T0.[OnHand])
FROM OITW T0
WHERE T0.[WhsCode] IN ('WH07', 'WH08', 'WH04', 'WH05')
and T0.ItemCode = $[$38.1.0]
GROUP BY T0.ItemCode
Regards,
Johan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Thanks Johan Hakkesteegt. It's working... 🙂
User | Count |
---|---|
95 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
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.