Unmatched Query Wizard

  • Thread starter Thread starter kim
  • Start date Start date
K

kim

i'm getting a wrong answer when i used the unmatched query
wizard based on 2 queries that are listing just unique
entries in 2 different tables.

so i changed the criteria of the matching field to "" from
Is Null, then the correct results were returned.

for other queries, 'Is Null' criteria works fine.

what's going on here?


my example:

in query 1, using table 1 [current or live database], only
unique entries were listed for field 1 [office name] and
field 2 [assigned tasks]

in query 2, using table 2 [previous database], only unique
entries were listed - field 3 [office name] and field 4
[assigned tasks]

i'm trying to identify any records that are differ between
[field 1 + field 2] and [field 3 + field 4]

i used '&"-"&' to temporarily merge two fields in the
queries. i didn't change table structures such as length
or data type, however.

thanks in advance...
 
Hi,


You should try something like:

SELECT *

FROM myTable As a LEFT JOIN otherTable As b
ON a.f1=b.f3 AND a.f2=b.f4

WHERE b.primarykey IS NULL



The concatenation would be slower, since the engine won't be able to use the
indexes (if they exist) on the implied field, and it would "break" if there
is already a '-' in one of the fields.



Hoping it may help,
Vanderghast, Access MVP
 
Back
Top