Solved

MsAccess table comparisons

Posted on 2011-03-24
5
272 Views
Last Modified: 2012-06-21
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

0
Comment
Question by:LennyGray
  • 4
5 Comments
 
LVL 2

Expert Comment

by:jo_m
ID: 35206617
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
0
 
LVL 10

Author Comment

by:LennyGray
ID: 35207744
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
0
 
LVL 10

Accepted Solution

by:
LennyGray earned 0 total points
ID: 35210085
Thanks Jo... I solved it myself.

I performed a query that updated every field in both tables using the NZ function. Then I did the matches. The default replacements in the NZ replaced the NULL value with a date (my birthday) or a Character (X) or an Integer (0).
0
 
LVL 10

Author Comment

by:LennyGray
ID: 35234190
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

0
 
LVL 10

Author Closing Comment

by:LennyGray
ID: 35239120
see my note to Jo.
0

Featured Post

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How can I Flash a mandatory field in Access Form? 13 46
Access report groups with sums 5 26
Create a EXCEL FIle from Access Procedure 1 13
Filter a form 8 12
The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question