Unmatched qry, 2 fields

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi:

I have 2 tbls named All HRMS and LOV_tbl. I'm trying to create an unmatched
qry. In each table there are 2 fields I'm comparing. The 2 fields in the
All HRMS are DIRECTORY and LOOKUP_CODE and in the LOV_tbl they are HR Access
directory and Oracle_Lookup_Code. The query should pull where the DIRECTORY
and HR Access directory equal and where LOOKUP_CODE and Oracle_Lookup_Code do
not equal. I can't seem to get it to work using the unmatched wizard.
 
Hi,


Try something along the syntax:

SELECT DISTRINCTROW table1.*
FROM table1 INNER JOIN table2
ON table1.field1 = table2.field1
AND table1.field2 = table2.field2
WHERE table2.field1 IS NULL


ie, add the extra condition in the ON clause. The wizard handles just one
condition, but nothing is wrong adding more tests in order to define "a
match" / "no match" .




Hoping it may help,
Vanderghast, Access MVP
 
Back
Top