Problem With Nest Query (1 Viewer)

mhong

Registered User.
Local time
Today, 13:17
Joined
Sep 28, 2001
Messages
13
I have a nest query as below:
SELECT field1 FROM table1
WHERE field1 NOT IN
( SELECT field2 FROM table2
WHERE field3 = TRUE )
This query run fine as long as the second query ( the inner query ) have return at least one record.
But there is still a case where the second query does not return any record then my nest query will run forever.
Please help me how to fix this query.
 
Use DCount to see if the first query returns any records before you run your query.
 
You are right. Use Dcount would work. But I use this query at run time. Is there any solution that can always return a records in my query without using Dcount.
Thank for your help.
 

Users who are viewing this thread

Back
Top Bottom