I have two tables in an Access db which, after a lot of processing has been done, should be exactly the same.
By this I mean that there should be the same number of records in each table, and each record should exist in both tables with exactly the same values in each field.
The tables are approx 600,000 records each. I have tried a couple of different ways of doing this, but my db seems to crash with all of them. So far I have tried...
Method 1:
1. Run count on both to make sure they are the same.
2. Run SELECT * FROM tblA UNION SELECT * from tblB; and get count from this.
3. If count is the same then I presume tables are identical.
4. If not, run Unmatched query on both tables to get differences.
Problem with Method 1. Unmatched query can't cope.
Method 2:
1. Append data from both tables into a new table, making the Amount field from one table negative.
2. Run a query to groupby all fields and sum the Amount and show results where the Amount <> 0.
Problem with Method 2. VERY slow. Actually as we speak it has just completed,not sure how successfully.
Should I try doing it with recordsets, concatenating the entire record, one at a time, from one table and searching for that concatenated string throughout the other table (concatenating the records also, of course)?
If so, I can do most of it, but would like some help with the Find code.
If not, does anyone know a better way to do this.
thanks in advance
By this I mean that there should be the same number of records in each table, and each record should exist in both tables with exactly the same values in each field.
The tables are approx 600,000 records each. I have tried a couple of different ways of doing this, but my db seems to crash with all of them. So far I have tried...
Method 1:
1. Run count on both to make sure they are the same.
2. Run SELECT * FROM tblA UNION SELECT * from tblB; and get count from this.
3. If count is the same then I presume tables are identical.
4. If not, run Unmatched query on both tables to get differences.
Problem with Method 1. Unmatched query can't cope.
Method 2:
1. Append data from both tables into a new table, making the Amount field from one table negative.
2. Run a query to groupby all fields and sum the Amount and show results where the Amount <> 0.
Problem with Method 2. VERY slow. Actually as we speak it has just completed,not sure how successfully.
Should I try doing it with recordsets, concatenating the entire record, one at a time, from one table and searching for that concatenated string throughout the other table (concatenating the records also, of course)?
If so, I can do most of it, but would like some help with the Find code.
If not, does anyone know a better way to do this.
thanks in advance