Subquery Question

  • Thread starter Mark via AccessMonster.com
  • Start date
M

Mark via AccessMonster.com

Good day,

I am having a problem with a subquery and was wondering if there is a better
way to get the result needed. I have a table with customers and need to
exclude some of them based on a listing in a query that I created. The query
that I am trying to run is:

Select customer
From tablename
Where customer not in (Select customer from queryname)

The db times out when I run the query! The total number of records in table
(a) is 13135 and only (15) in the subquery (15).

Thank you in advance for the help provided.
 
A

Allen Browne

Unless you've simplified the example for this post, you may find it easier
to use a frustrated outer join instead of a subquery.

The Unmatched Query Wizard can create this for you.
Tell it you want the records from the table that are not in the saved query.
 
M

Mark via AccessMonster.com

Thank you Allen very much it worked. I do not know why I didn't think of that,
I think I was over thinking it.

Allen said:
Unless you've simplified the example for this post, you may find it easier
to use a frustrated outer join instead of a subquery.

The Unmatched Query Wizard can create this for you.
Tell it you want the records from the table that are not in the saved query.
Good day,
[quoted text clipped - 14 lines]
Thank you in advance for the help provided.
 

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

Similar Threads


Top