Finding matching/non-matching rows between two tables (same-but not updated).

  • Thread starter Thread starter Mario
  • Start date Start date
M

Mario

I have two tables which are exactly the same in structure
having same fields but one is more updated and hence has
more records than the other. How can I find the matching
and non-matching records between these two tables.

Lets take the following as an example:

TABLE 1:

ID ClientName Age
---------------------------
1 Jeff 21
2 Henry 45
3 Linda 17
4 Scott 70
5 Richard 30


Table 2:

ID ClientName Age
---------------------------
1 Jeff 21
2 Mark 34
3 Henry 45
4 Quetta 89
5 Linda 17
6 Carlos 87
7 Scott 70
8 Richard 30


What will be my sql querry to find the matching and non-
matching records between the two tables.

Thanks
Mario
 
ACCESS actually has a wizard that will set this up for you. Create a query
using the New icon and the wizard will show an option (Find unmatched
records; or something similar to this). That will get you there.

Essentially, what you are doing is linking the two tables together with a
Left or Right Join (depending upon which field is linked to which) and then
specifying the query to show you the records where the value of one field in
one table is Null (meaning there is no matching record).

Try the wizard and then post back if you need additional info.
 
Back
Top