med
01-25-2002, 02:49 AM
hey, i need a step be step guide to how to do this as im really lost
I have a query in which i have an ID number and a quantity relating to a part table. I need to make some sort of query to add up all the quantities of one ID, then subtract it from the total quantity, then do this again with the other ID's
My query looks like this, it is an order query, showing what has been purchased
ID Quantity
1 10
1 30
2 50
2 20
2 25
I then have a table somewhere else with the IDs and the total quantities in stock and their IDs
eg
1 500
2 400
etc
What i need to do is add up all quatity values for each ID, so i add up all the ID 1 quatities and get a total, and then subract this total from the overall total in my other table
appreciate any help
I have a query in which i have an ID number and a quantity relating to a part table. I need to make some sort of query to add up all the quantities of one ID, then subtract it from the total quantity, then do this again with the other ID's
My query looks like this, it is an order query, showing what has been purchased
ID Quantity
1 10
1 30
2 50
2 20
2 25
I then have a table somewhere else with the IDs and the total quantities in stock and their IDs
eg
1 500
2 400
etc
What i need to do is add up all quatity values for each ID, so i add up all the ID 1 quatities and get a total, and then subract this total from the overall total in my other table
appreciate any help