Finding all Authors in a Query

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
 
S

Smartin

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?
 
S

Smartin

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).
 
Top