I am managing an asset where multiple locations can have multiple pumps, each with an injection rate that can be changed at most daily. Currently the total injection rate is managed using a spreadsheet where all rates are updated daily whether they have changed or not. I want to change this to a database format where only rate adjustments are logged. So, my adjustment table looks something like this...
AdjustmentDate Location_ID Pump_ID Chemical_ID InjectionRate 1/1/14 1 1 1 10 1/1/14 1 2 1 15 1/5/14 1 1 1 5 1/7/14 1 1 1 12
Those daily updates need to be configured in a final query so that any given day outputs the correct total injection rate for that day...for each chemical at each location. The final query needs to look something like this...
Date Location_ID Chemical_ID TotalInjectionRate 1/1/14 1 1 25 1/2/14 1 1 25 1/3/14 1 1 25 1/4/14 1 1 25 1/5/14 1 1 20 1/6/14 1 1 20 1/7/14 1 1 27
Thanks in advance for your help...I just can't seem to get it to work.