Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Comparing 2 Tables 2

Status
Not open for further replies.

ghayman73

Technical User
Jul 3, 2002
55
0
0
FR
Is it possible to compare 2 tables to show all records that are in "TABLE A" that are NOT in "Table B".

I have around 11000 records in TABLE B and 8000 in Table B and would like to see whats missing.
I've looked at table relationships but they seem to show the opposite of what i want.

Thanks for reading this question.

Grant
 
Create a query between the two tables. Pull back the data from both in your critera. Next select the join line between the two tables and set it so it selects all data from Table A. What you should find in the result of this is that in the query there should be gaps where the data from Table B is missing. You can then filter for the Null returns, and that will be the list of data from Table B that is missing.

Hope I explained that okay,

Regards,

Ian
 
Thanks for your quick respose Molby,

"Pull back the data from both in your critera"

sorry what does that mean?

 
Sorry, what I mean is to pull in the two columns of data from the tables you are trying to compare into the query. So for example if you have in Table A 'Names' and in Table B you have 'Names', you need to pull both of these back in the query. Then link the tables as I suggested above. When the query runs, you should find that in the results for Table B, there should be blanks in the 'Name' field.

Let me know if you need any more help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top