K
kayabob
I want to make a query to find the differences in various fields for
matching records. For example, I have two tables with SSN as the PK. I know
that the SSN's make a one to one match from table 1 to table 2, but what I
want to find are differences for a single SSN where on table 1 the FirstName
is Chuck, but on table 2 the first name is Charles. I have to check for the
differences for 45 fields (addresses, phones, etc etc). I tried something
like this:
SELECT tbl1.[field 1]
FROM tbl1, tbl2
WHERE (((tbl1.[field 1])<>[tbl2]![field 2]));
but I cant get it to work for multiple fields combining with OR. Plus this
seems too hard to do for 45 fields. Any suggestions of any easy way to do
this would be appreciated.
Thanks.
matching records. For example, I have two tables with SSN as the PK. I know
that the SSN's make a one to one match from table 1 to table 2, but what I
want to find are differences for a single SSN where on table 1 the FirstName
is Chuck, but on table 2 the first name is Charles. I have to check for the
differences for 45 fields (addresses, phones, etc etc). I tried something
like this:
SELECT tbl1.[field 1]
FROM tbl1, tbl2
WHERE (((tbl1.[field 1])<>[tbl2]![field 2]));
but I cant get it to work for multiple fields combining with OR. Plus this
seems too hard to do for 45 fields. Any suggestions of any easy way to do
this would be appreciated.
Thanks.