About Access

  • Thread starter Thread starter Ramaprasad Keshavamurthy via AccessMonster.com
  • Start date 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
 
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
 

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

Back
Top