D
Daniel
Hi,
I've been writing a query which is subsequently used as a source in an
update query (so it has to be updateable).
When I run the (slow, ~10 minute) query, I get the wrong number of
records returned (e.g. 1687 instead of 1688). After determining which
record(s) was missing, I added another statement to the WHERE clause
to select that record (e.g. 'AND EL.ID = 7657') and lo-and-behold, the
record shows up as the (only) result. It seems inconsistent between
one run and the next (or possibly between one compile of the query and
the next) as to which record(s) are skipped.
Has anyone experienced something like this before? It's the second
time in the last week which I've had this happen (on similar queries),
and it's somewhat disturbing.
Here's my query without the additional clause:
SELECT EL.ID, EL.rating, EL.voltage, EL.equip_no
FROM qryElecEQItems AS EL
LEFT JOIN qryPossibleVoltages AS qPV ON (EL.metricPower <=
qPV.rating AND nz(EL.ctrllerType, 1) = qPV.mtrTypeID)
WHERE isnull(EL.motor_tag) = false
AND EL.voltage_overridden = false
AND EL.metricPower > 0
AND EL.elecManualAddn = false
AND qPV.voltage = (SELECT min(q1.voltage) FROM qryPossibleVoltages
AS q1 WHERE q1.mtrTypeID = nz(EL.ctrllerType, 1) AND q1.rating >=
EL.metricPower)
AND qPV.rating = (SELECT min(q1.rating) FROM qryPossibleVoltages AS
q1 WHERE q1.mtrTypeID = nz(EL.ctrllerType, 1) AND q1.rating >=
EL.metricPower)
and the clause I add to return only the missing record:
AND EL.ID = 7657
Thank you for any insight,
Daniel
I've been writing a query which is subsequently used as a source in an
update query (so it has to be updateable).
When I run the (slow, ~10 minute) query, I get the wrong number of
records returned (e.g. 1687 instead of 1688). After determining which
record(s) was missing, I added another statement to the WHERE clause
to select that record (e.g. 'AND EL.ID = 7657') and lo-and-behold, the
record shows up as the (only) result. It seems inconsistent between
one run and the next (or possibly between one compile of the query and
the next) as to which record(s) are skipped.
Has anyone experienced something like this before? It's the second
time in the last week which I've had this happen (on similar queries),
and it's somewhat disturbing.
Here's my query without the additional clause:
SELECT EL.ID, EL.rating, EL.voltage, EL.equip_no
FROM qryElecEQItems AS EL
LEFT JOIN qryPossibleVoltages AS qPV ON (EL.metricPower <=
qPV.rating AND nz(EL.ctrllerType, 1) = qPV.mtrTypeID)
WHERE isnull(EL.motor_tag) = false
AND EL.voltage_overridden = false
AND EL.metricPower > 0
AND EL.elecManualAddn = false
AND qPV.voltage = (SELECT min(q1.voltage) FROM qryPossibleVoltages
AS q1 WHERE q1.mtrTypeID = nz(EL.ctrllerType, 1) AND q1.rating >=
EL.metricPower)
AND qPV.rating = (SELECT min(q1.rating) FROM qryPossibleVoltages AS
q1 WHERE q1.mtrTypeID = nz(EL.ctrllerType, 1) AND q1.rating >=
EL.metricPower)
and the clause I add to return only the missing record:
AND EL.ID = 7657
Thank you for any insight,
Daniel