Finding all Authors in a Query

  • Thread starter Thread starter MilGar
  • Start date Start date
M

MilGar

I have a Query that includes Authors,Rating Books and other fields. The
criteria control is in Rating Books and is (is Null). This criteria will
list all the unread books, but will not list Authors who do not have unread
Books. I would like to show all Authors irrelevant of Rating Books. Thanx
 
MilGar said:
I have a Query that includes Authors,Rating Books and other fields. The
criteria control is in Rating Books and is (is Null). This criteria will
list all the unread books, but will not list Authors who do not have
unread Books. I would like to show all Authors irrelevant of Rating
Books. Thanx

Hi MilGar,

The answer depends on how your tables are set up and whether you are
storing nulls vs. empty strings. Are Authors and Books in separate
tables, and if so, how are the tables related?
 
Smartin said:
Hi MilGar,

The answer depends on how your tables are set up and whether you are
storing nulls vs. empty strings. Are Authors and Books in separate
tables, and if so, how are the tables related?

MilGar replied via email:
There is a table for authors and books -authorID to authorID.

Ah! Well, with the criterion of Null you would only see Authors with no
entry in the related table [Books]... your basic "unmatched" query. I am
guessing you also have these tables joined with an outer join of some
kind (in the query design view, this would look like a joining line with
an arrowhead pointing to the Books table).

If you were to remove the Null constraint, you should see all Authors.
The outer join is correct for what you are trying to do.

If this is making no sense, please post the SQL (switch to SQL view
whilst looking at the query and post the text therein).
 

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