M
mbynoe via AccessMonster.com
Hello,
How can set up in a query: Yesterdays work_mcf added to today's MCF
subtracted by today's with_mcf? I have the following query:
INSERT INTO workmcf ( meter_number, prod_date_time, work_mcf )
SELECT w1.meter_number, w1.prod_date_time, (Select Sum ((w.work_mcf + w.
meas_mcf) - with_mcf) from workingnew w Where w.prod_date_time <= w1.
prod_date_time and w1.meter_number = w.meter_number and w.
prod_date_time>DateAdd ("d",-2, start)) AS work_mcf
FROM workingnew AS w1
WHERE (((w1.meter_number) in (Select meter_number from InjectedMeter))) AND (
((w1.prod_date_time between [start] AND [end])))
ORDER BY w1.meter_number, w1.prod_date_time;
Thank you!
How can set up in a query: Yesterdays work_mcf added to today's MCF
subtracted by today's with_mcf? I have the following query:
INSERT INTO workmcf ( meter_number, prod_date_time, work_mcf )
SELECT w1.meter_number, w1.prod_date_time, (Select Sum ((w.work_mcf + w.
meas_mcf) - with_mcf) from workingnew w Where w.prod_date_time <= w1.
prod_date_time and w1.meter_number = w.meter_number and w.
prod_date_time>DateAdd ("d",-2, start)) AS work_mcf
FROM workingnew AS w1
WHERE (((w1.meter_number) in (Select meter_number from InjectedMeter))) AND (
((w1.prod_date_time between [start] AND [end])))
ORDER BY w1.meter_number, w1.prod_date_time;
Thank you!