Count function show zero when no record for an institution

G

George in Waco

I've got two databases. One is a master listing of colleges, and the other is
a listing of federal lawsuits since calendar year 2000. I'm using the count
function to add up the number of lawsuits filed against each college, but
some colleges have no federal lawsuits. Accordingly, the count function
skips them altogether in the query instead of returning a zero. How can I
make a zero value appear in the query when I run it?
 
J

James Goodman

Use an OUTER JOIN between the tables so it selects all records from the
Colleges table, & only related records from the lawsuits table. I think this
should give you the required result...
 

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