Link to home
Start Free TrialLog in
Avatar of LennyGray
LennyGrayFlag for United States of America

asked on

MsAccess table comparisons

Hi All -

I have two huge tables (900,000+) that have the exact same structures. I would like to compare every field (93) in each table to determine where the differences are. A field in Table A could have a Null and the same-name fields in Table B could be a zero. Also, corresponding fields in each table could both be Null.

I tried a join (just to produce exact records in each table) but that did not seem to be working as I wanted.

Any ideas?

Lenny

Avatar of jo_m
jo_m

Hello Lenny

 a few quick questions to start
do the tables have a primary key,
are the sort orders matched,
is it likely that whole rows or blocks of records will be  missing
is it just to field content level or are we looking for diffences or data types as well

tx

jo
Avatar of LennyGray

ASKER

Hi Jo -

This is a nightmare user request <sigh>

1. There is no primary key in either table
2. I sorted the tables but there could be duplicates, but I am unsure
3. There will be missing rows from each side of the matching
4. The data types should be the same between Table A and Table B but I am uncertain.

Ideally, I would like to determine the records that matched, the unmatched A and unmatched B records.

Thanks,
Lenny
ASKER CERTIFIED SOLUTION
Avatar of LennyGray
LennyGray
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Here is a useful command-line utility to check the contents of two tables with the same structure. The resulting text file indicates the field name and value that differed between the two tables being compared.

The executable is a Microsoft utility named: tablediff.exe. You can find details in:

You can find the syntax, optional switches and an example in: http://msdn.microsoft.com/en-us/library/ms162843.aspx

see my note to Jo.