About Access

  • Thread starter Ramaprasad Keshavamurthy via AccessMonster.com
  • Start date
R

Ramaprasad Keshavamurthy via AccessMonster.com

I have two database with same tables and same field name. My requirement is
to get the Distinct data either from a or b database but when the records
reaches more than 30000 then the query will never execute. Here is the code
written.

SELECT b.BatchNumber AS Batchno FROM
[;Database=C:\Btrieve\TempBPS171.mdb].Batch AS b LEFT JOIN
[;Database=C:\Btrieve\BPS171.mdb].Batch AS a ON
b.BatchNumber<>a.BatchNumber WHERE
b.BatchNumber<>a.BatchNumber
 
J

John Spencer (MVP)

So what you want is all records in A not in B and all records in B not in A? I
would suggest a union query to do that. If what you want is just All Records in
B not in A, I would try the following query? I'm not sure your syntax is
correct since I don't use that particular syntax - I usually link to the tables
vice using this syntax.

SELECT b.BatchNumber AS Batchno FROM
[;Database=C:\Btrieve\TempBPS171.mdb].Batch AS b LEFT JOIN
[;Database=C:\Btrieve\BPS171.mdb].Batch AS a ON
b.BatchNumber=a.BatchNumber WHERE
a.BatchNumber is null
 
Top