I am trying to make a chemical inventory database. The main problem I run into is making the query or queries to calculate usage. We do a physical inventory monthly and receive deliveries during the month. I want to get a starting inventory and add all the deliveries, then subtract the ending inventory to get a usage. Then I want to calculate the days between the starting inventory and ending inventory so I can get a daily usage. I would have an inventory table like the following:
TankID InvDate Gallons
Then I would have a delivery table like this:
TankID DelDate Gallons
So I want the last two inventories and all the deliveries between that date range to make the calculation.
I hope I explained it well enough.
Any help would be greatly appreciated.
TankID InvDate Gallons
Then I would have a delivery table like this:
TankID DelDate Gallons
So I want the last two inventories and all the deliveries between that date range to make the calculation.
I hope I explained it well enough.
Any help would be greatly appreciated.