M
mbynoe via AccessMonster.com
Please...help.....My query freezes when I try to execute the following query..
..
INSERT INTO workingnew ( meter_number, prod_date_time, meas_dth, meas_mcf,
BTU )
SELECT dbo_meterset_volume.meter_number, dbo_meterset_volume.prod_date_time,
[meas_dth]/1000 AS DTH, [meas_mcf]/1000 AS MCF, IIf([meas_mcf]<0.0001," 0",+
[meas_dth]/[meas_mcf]*1000) AS BTU
FROM dbo_meterset_volume
GROUP BY dbo_meterset_volume.meter_number, dbo_meterset_volume.prod_date_time,
[meas_dth]/1000, [meas_mcf]/1000, IIf([meas_mcf]<0.0001," 0",+[meas_dth]/
[meas_mcf]*1000)
HAVING (((dbo_meterset_volume.meter_number) In (Select meter_number from
InjectedMeter)) AND ((dbo_meterset_volume.prod_date_time) Between (Select
DateAdd("d", 1, Max(prod_date_time)) From workingnew) And ( date() ) ) );
I want to be able to click a button and get the current information based off
of the max date.
Thanks
..
INSERT INTO workingnew ( meter_number, prod_date_time, meas_dth, meas_mcf,
BTU )
SELECT dbo_meterset_volume.meter_number, dbo_meterset_volume.prod_date_time,
[meas_dth]/1000 AS DTH, [meas_mcf]/1000 AS MCF, IIf([meas_mcf]<0.0001," 0",+
[meas_dth]/[meas_mcf]*1000) AS BTU
FROM dbo_meterset_volume
GROUP BY dbo_meterset_volume.meter_number, dbo_meterset_volume.prod_date_time,
[meas_dth]/1000, [meas_mcf]/1000, IIf([meas_mcf]<0.0001," 0",+[meas_dth]/
[meas_mcf]*1000)
HAVING (((dbo_meterset_volume.meter_number) In (Select meter_number from
InjectedMeter)) AND ((dbo_meterset_volume.prod_date_time) Between (Select
DateAdd("d", 1, Max(prod_date_time)) From workingnew) And ( date() ) ) );
I want to be able to click a button and get the current information based off
of the max date.
Thanks