M
mbynoe via AccessMonster.com
Can someone please tell me why this query isn't working correctly:
INSERT INTO workingnew ( meter_number, meter_name, prod_date_time, meas_dth,
meas_mcf, BTU )
SELECT dbo_meterset_volume.meter_number, dbo_meter.meter_name,
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 INNER JOIN dbo_meter ON dbo_meterset_volume.
meter_number=dbo_meter.meter_number
GROUP BY dbo_meterset_volume.meter_number, dbo_meter.meter_name,
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)=#9/29/2006#));
Thanks!
INSERT INTO workingnew ( meter_number, meter_name, prod_date_time, meas_dth,
meas_mcf, BTU )
SELECT dbo_meterset_volume.meter_number, dbo_meter.meter_name,
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 INNER JOIN dbo_meter ON dbo_meterset_volume.
meter_number=dbo_meter.meter_number
GROUP BY dbo_meterset_volume.meter_number, dbo_meter.meter_name,
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)=#9/29/2006#));
Thanks!