I am having two tables one for purchase and second for sale. I want to create a query to get pending quantity.
Ex. In Purchase Order File (2 records exsits)
OrderID Party Quality Qty.
1 A AA 10
2 B BB 5
In Sale Order file
OrderID Party Quality Qty. PurchaserOrderID
11 A AA 10 1
12 B BB 15 2
From Query I want to get following result:
OrderID Party Quality Qty.
2 B BB -10
Because the users entered quantity more than purchase. If pending quantity of any purchase order or sale order is 0. I do not want to show those order. I just want to get the pending quantity whether its in + or -. A purchase order can have more than one sale order.
Sorry for my bad english. Hope u help soon.
Thanks in advance