Summing Quantities of same product in multiple locations

stucky

Registered User.
Local time
Tomorrow, 02:44
Joined
Sep 19, 2013
Messages
16
Hi
I would appreciate if someone could point me in the right direction.
I have a transactions table which records a qty number (- or +) and references particular location details (location, room, rack, shelf etc). My question is how do I sum the qty for the same product at different locations. So my user sees that product A has a qty of X in location C and qty Y in location D. I can sum the transactions table qty which does give me a sum based on a single location but each location has multiple racks, shelves etc. I need to know the sum of transactions for the same product for exactly the same location, room rack etc
Apologies if the above is not very clear.

thanks,
 
You need to use a group by and count query. Without knowing your field names it would be something like;

Code:
SELECT PartNumber, Location, Rack, Shelf, Sum(Qty) as LocationTotal
FROM tblPartsTransactions
GROUP BY PartNumber, Location, Rack, Shelf
 
Hi Minty,
Thanks for taking the time to help. I will focus on your suggestion and see how I get on.
Much appreciated.
 
Hi Minty,
Just wanted to thank you again. Your suggestion allowed me to get exactly what I wanted.

Thank you.
 

Users who are viewing this thread

Back
Top Bottom