AC5FF
Registered User.
- Local time
- Today, 07:24
- Joined
- Apr 6, 2004
- Messages
- 552
I'm working with an inventory control database. I have a query that runs just fine that will give me a running balance for each item in inventory. That query's output is just two columns; Stock Number and On Hand. (sorted by Stock Number in assending order...)
Now I need to further modify the output with (I would prefer) a 2nd query; but I don't know where to start for this one...
For example; Here's what my first query would return:
But for a new report I am creating I need to condense this by prime Stock Numbers only. So; for example I would like the query to sum all the like Stock Numbers. Instead of showing 5 of 4725-02-0021 and 3950 of 4725-02-0021-S1 I want to be able to show 3955 of stock number 4725-02-0021. The same could be said of Stock Number 4725-02-0020-S2, I would like the output to show 792 of 4725-02-0020.
For reference - all stock numbers are in this same format of ####-##-#### with the following -S# being a substitute for the prime part.
In the case of the 4725-02-0020-S2 part, there is zero on hand for its prime part.
One other thing that just crossed my mind. If it helps, there is another table that lists every Stock Number - regardless of inventory. This table is where I can pull out the details of each stock number (part number/manufacturer/description/etc...)
Thanks!
Now I need to further modify the output with (I would prefer) a 2nd query; but I don't know where to start for this one...
For example; Here's what my first query would return:
Code:
STOCK NUMBER ON Hand
4725-02-0019 930
4725-02-0020-S2 792
4725-02-0021 5
4725-02-0021-S1 3950
4725-02-0022 22
4725-02-0022-S1 15
4725-02-0022-S2 1450
4725-02-0023 912
4725-02-0024 21
4725-02-0024-S1 1850
4725-02-0025 2683
But for a new report I am creating I need to condense this by prime Stock Numbers only. So; for example I would like the query to sum all the like Stock Numbers. Instead of showing 5 of 4725-02-0021 and 3950 of 4725-02-0021-S1 I want to be able to show 3955 of stock number 4725-02-0021. The same could be said of Stock Number 4725-02-0020-S2, I would like the output to show 792 of 4725-02-0020.
For reference - all stock numbers are in this same format of ####-##-#### with the following -S# being a substitute for the prime part.
In the case of the 4725-02-0020-S2 part, there is zero on hand for its prime part.
One other thing that just crossed my mind. If it helps, there is another table that lists every Stock Number - regardless of inventory. This table is where I can pull out the details of each stock number (part number/manufacturer/description/etc...)
Thanks!