Need Query Help

W

wurrzog

I have two tables, Table A & Table B, in my database that have the
same fields (Name, SSN, etc). Most of the records in both tables are
identical, but each table has some unique records. I would like to run
a query that will select the unique records in Table A by comparing
SSNs, and then do the same for Table B.

I am a database novice, and have tried all the wizards and expression
builders with no luck.

Any help at all would be appreciated. Thank you!!!

Scott
Casa Grande, AZ
 
R

Rob Parker

Hi Scott,

The "Find Unmatched Query Wizard" is what you need. If you only want to
check for SSNs then just use that field when asked which field to match on.

If you want to find possible differences in other fields (for the same SSN),
you will need to add additional joins on more than a single field if you
have partial matches in the records. Open the wizard-generated query in
design mode, drag a field from the first table to the corresponding field in
the second table to create a join, then right-click on the join line and
select the appropriate join type; add the field from the second table with
an Is Null criteria.

You will need two queries to find unmatched records in both tables.

HTH,

Rob
 
W

wurrzog

Hi Scott,

The "Find Unmatched Query Wizard" is what you need. If you only want to
check for SSNs then just use that field when asked which field to match on.

If you want to find possible differences in other fields (for the same SSN),
you will need to add additional joins on more than a single field if you
have partial matches in the records. Open the wizard-generated query in
design mode, drag a field from the first table to the corresponding field in
the second table to create a join, then right-click on the join line and
select the appropriate join type; add the field from the second table with
an Is Null criteria.

You will need two queries to find unmatched records in both tables.

HTH,

Rob









- Show quoted text -

Rob - That worked!

Thank you very much!
 

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

Similar Threads


Top