Best way to compare data between tables?

J

jrGman

Summary: What's the best way to compare two tables
(ColumnA with ColumnA, ColumnB to ColumnB, etc.) and
create a set of records where differences exist?


Detail:
I have two tables, each with identical columns. Let's say
the columns are Name, Emp_no, Marital_status, and
Phone_number. Table1 is last month's information, Table2
is this month's information. This month one of the
employees changed their phone number, another employee
went from Single to Married, and two new employees were
added. The remaining employees have identical information
in all columns.
We're looking for a result set that would include 4
records; The Emp_no and new phone number for the first
scenaro, with nulls in the remaining columns. The Emp_no
and new Marital_status for the second scenario, with nulls
in the remaining columns. And all columns for the two new
employees.

Is this possible using regular queries? Is is possible
with a module/vb? Some suggestions have been made to
concatenate all the columns together and do a Find
Unmatched query, or split each column out into each own
table and then do a Find Unmatched Query.... but these
suggestions don't seem to be very practical, mainly
because we are actually attempting to compare about 50
columns.

~jrGman
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top