Compare two tables

  • Thread starter Thread starter Jimmy
  • Start date Start date
J

Jimmy

Hello, I am new in Access so maybe what I ask is simple.
I have 2 tables tbl2004 and tbl2005
Thay have exactly the same fields in every table. (name address, city, code,
and a number)
I want to know which names are in both tables.
Step by step instructions please.
Thank You in advance
Jimmy
 
Open a new query and drag the two tables into the top part of the query
builder.

Drag the name field(s) from one table to the other table: that'll create a
join based on the name.

Drag whatever fields you want to see into the grid at the bottom, set a sort
order (if wanted) and run your query.
 
Jimmy

?You have two identical tables, each named after a year?

This might be necessary if you were using Excel or another spreadsheet, but
you've posted in an Access newsgroup, and I'll assume you are asking a
question about using Access.

Embedding data in table names reduces the number of built-in Access features
and functions you can use without resorting to extraordinary measures. An
alternative would be a table designed to hold (apparently) person
information, a table to hold valid codes (???), and a third table that
holds:

trelThirdTable
ThirdTableID
PersonID
Code
DateOfSignificance

With a design like this, your information about 2004 folks can be found by
querying the ThirdTable for DateOfSignificance (don't use the name "Date" -
it is a reserved word in Access) with Year(DateOfSignificance) = 2004.
 
Back
Top