query excludes other query

  • Thread starter Thread starter Wim
  • Start date Start date
W

Wim

Hi all,

I have two queries : GeneralQry and NotToIncludeQry. The
primary key for both is : Id.

I want to exclude all the data of NotToIncludeQry from
GeneralQry.

In the query by example form I write GeneralQry.Id <>
NotToIncludeQry.Id . This however seems to take for ever
before getting a response, so I CTRL-BREAK.

Anyone an idea ?

Thanks in advance,

Wim
 
Wim

You've given no idea about the size of your underlying tables, nor the
expected number of rows returned from each query, nor the version of Access,
nor the 'horsepower' of the PC, nor whether this is data in a back-end over
a network, nor the network speed, nor ...

It'll be a little tough to diagnose without a little more information... but
I could make a wild guess?!

If you select the Query button from the toolbar, and select the
"Unmatched..." wizard, it will help you create a query that looks for values
in one table/query not found in another.

Good luck!

Jeff Boyce
<Access MVP>
 
There are two tables, one having 2000 rows, the other 186.
So I would have expected 2000 minus 186 rows, instead I
get about 50 rows more when doing the unmatched query
wizard. I use Access 2002 on a stand-alone Pentium III
1GHz.

Wim
 
Wim

That suggests that your 2000 row table includes many copies of the IDs found
in the 186 row table.

Try doing a "matching" query, where you find the ones that DO match between
the tables. How many do you get?

Jeff Boyce
<Access MVP>
 
Back
Top