Adam McReynolds
Registered User.
- Local time
- Yesterday, 19:54
- Joined
- Aug 6, 2012
- Messages
- 129
I have a battery inventory DB I am working on. The instances are recorded as "IN" or "OUT" and there is a quantity connected to each record/instance. I need a query to subtract the quantity of "IN's" from "OUT's" based on the CustomerID.
Currently I have made a totals query for Each "IN" and "OUT" but cannot get them to subtract from each other AND display the customer name.
Here is what I have so far:
Any help would be awesome.
Currently I have made a totals query for Each "IN" and "OUT" but cannot get them to subtract from each other AND display the customer name.
Here is what I have so far:
Code:
SELECT QRY_SUM_ACTIONS_IN.[SumOfQty]-QRY_SUM_ACTIONS_OUT.[SumOfQty] AS StockBalance
FROM QRY_SUM_ACTIONS_IN INNER JOIN QRY_SUM_ACTIONS_OUT ON QRY_SUM_ACTIONS_IN.[ActionEntity] = QRY_SUM_ACTIONS_OUT.[ActionEntity];
Any help would be awesome.