compare data in identical tables

D

David

Well their structure is identical.

I have 2 tables that have different data.
The tables have 204 columns and 10, 864 rows. Mostly small text
fields, date fields and yes/no fields but there are 10 Memo fields.

I need to show the rows where any table 2 values are different from
the corresponding table 1.

I need a query or some VBA code, please.
 
P

Philip Herlihy

David said:
Well their structure is identical.

I have 2 tables that have different data.
The tables have 204 columns and 10, 864 rows. Mostly small text
fields, date fields and yes/no fields but there are 10 Memo fields.

I need to show the rows where any table 2 values are different from
the corresponding table 1.

I need a query or some VBA code, please.


Give a man a fish, and you feed him for a day. Teach a man to fish...

Start by getting it to work for one column. Use the Query Builder to
give you a query which selects records where values differ in one
column, using the Expression Builder to get your criterion right. Of
course, the tables have to have a shared key so you know which record
you should be comparing, so your query will need to match this key.
Then use separate rows in the "condition" part of the query builder (to
give you the OR operator) and add the same sort of thing for other
columns. You'll need to repeat the key-matching on each of these rows.

Phil, London
 
J

John W. Vinson

Well their structure is identical.

I have 2 tables that have different data.
The tables have 204 columns and 10, 864 rows. Mostly small text
fields, date fields and yes/no fields but there are 10 Memo fields.

OUCH. Is this a data warehouse, or a spreadsheet? It's certainly not a
properly normalized table.
I need to show the rows where any table 2 values are different from
the corresponding table 1.

I need a query or some VBA code, please.

You may need a few queries, not just one, because of the utterly unreasonable
size of this table (width, length is not a problem). Is there a Primary Key
on either table, or some field (or combination of fields) which uniquely
identify a record? Perhaps there is an Autonumber field? Do you want to
compare EVERY record in Table1 with EVERY record in Table2 to find mismatches;
or are you (incorrectly) assuming that there are record numbers in Access so
that you can compare "the 312th record" in Table1 with "the 312th record" in
Table2?
 

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

Top