No results

I

Ivor Williams

I've created four queries which return the same information based on
different criteria. Each of the queries is based on the same two tables.
There are no records in the tables that match the criteria for one of the
queries, so of course it returns nothing. I've created a fifth query which
is based on the other four queries and a table. If I run the fifth query, no
records are returned, but if I remove the query with no records, the fifth
query works fine. How can I 'trick' the fifth query into returning a zero
value for the query with no records instead of nothing at all?
 
S

Steve Schapel

Ivor,

The essence of this is that you need a Left Join to the query with no
records, and possibly the use of a Nz() function within the query to
return a 0 instead of Null. The details of this will depend on the
relationship between the queries and table in the fifth query. It could
well be appropriate to have the table "central" to the fifth query, and
all of the other 4 queries joined to it via a Left Join. If you need
any more help with this, please supply some more details - maybe a
copy/paste of the SQL view of the final query would be useful.
 

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

Top