Discussion Locked

Database query

0 helpful
9 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Access 97. A user created a new database and imported data into two tables (A and B) from two different excel spreadsheets (which he deleted) so that he could consolidate the information from the two into a single table in the database for ease of administration. The two spreadsheets should have contained exactly the same information, however we are not sure they did.

I have been tasked with producing a list showing what information is held in Table A that is not in Table B (which would showthe discrepancies that may have existed between the two spreadsheets). I have very little time to do this. Someone help!

Job on the line

9 replies

by ae_maillist

You need some kind of key information so you can match/connect the tables.

Yuo can make an outher join quert and see if some fields are null in the result...

Anders

by v-gathara

Thanks for this. We found an easy way to do this as there is a serial number mentioned that should be unique for each record in both tables.

by ae_maillist

You need some kind of key information so you can match/connect the tables.

Yuo can make an outher join quert and see if some fields are null in the result...

Anders

by donq

You didn't provide enough information to allow us to help you much! Are both Table structures identical? It there a column (in either or both tables) containing a unique value in each record - one that can be used to index through the entire recordset comparing Primary Key values. This is how database engines locate stuff for comparison. If structures are IDENTICAL AND there is a column containing a unique value in each row you can build a procedure to print unequal entries only and it should crank out your answer in a minute or less?

If structures differ you are out of luck (with a quick solution) and if there is no PRIMARY KEY field (containing a unique value in each row) you will need to build two reports and merge the results byany common value contained in one or the columns produced for the report!

You didn't screw up - the person deleting the original Excel file did and I hope you aren't held accountable for someone elses error? Your task could be simple or extremely complex depending on your answers to my structure and indexing questions. Good luck.

by v-gathara

Thanks for this. However the answer below showed us a wizard we could play around with.

My mistake in not giving information about possible similar fields in both tables.

by dklippert

From the Help file:

"Using the Find Unmatched Query Wizard, you can find records in one table that don't have related records in another table. For example, you can find customers who don't have orders.
In the Database window, click Queries under Objects, and then click New on the Database window toolbar.
In the New Query dialog box, click Find Unmatched Query Wizard.
Click OK."
Good luck

This discussion is closed to new replies.