Full Version: Comparing two tables in a database
UtterAccess Discussion Forums > Microsoft® Access > Access Reports
EIPC
Could someone tell me if there is a way I can compare tables, retrieving only the information if it exist in both tables.
example: table One Table two
Helen Helen
Mike Sue
Joe Joe

The table results would contain Helen and Joe

I need to compare this information as soon as possible, any help is appreciated.
DougY
What is the matching field you are searching? Is it unique to the record?

Something like this should work:

CODE
Select
      MyTable1.*
    , MyTable2.*
From
      MyTable1 T1
Inner Join
      MyTable2 T2
On
     T1.MatchingField = T2.MatchingField;


HTH
EIPC
Could you please provide detailed information on where I should enter this information. Is it in a query or what or am I during a macro? I am not that computer savvy. thanks in advance
ScottGem
Just create a query with the 2 tables. Join them on the matching field.
DougY
The script is for a query.

You'll be better off following Scott's advice by using the QBE to create the query.

HTH
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.