Zeros in a crosstab query

G

Guest

I have a crosstab query which analyses examination results. For a given
subject, the query counts the number of students with each grade (A, B, C,
etc) (the columns) in each of a number of schools (BW800, BW801, etc) (the
rows). If there are no students in a particular grade at a school, I use the
nz function to report zero. If there are no students for the subject at a
school, each cell in the row should contain zero, and I need the row to be
reported. However, in the event, such a row is not returned.

What can I do to get all rows returned regardless of the contents of the
cells - even when all the values are zero.

Any help would be much appreciated - as ever.

Jim Jones
 
G

Guest

Dear Duane

Thanks for the response. Can you help me a bit more. The query is based on
a single table which contains the School Identifier (BW800, BW801, etc) as
the first field. How do I set up " join which includes every school".

Sorry about this! Thanks again!

Jim Jones
 
D

Duane Hookom

I can't imagine a system that doesn't have a table with every unique School
Identifier and the associated school name etc. However, if you don't have
one, you can create a group by/totals query that does the same thing.

SELECT [SchoolIdentifier]
FROM tblYourTable
GROUP BY [SchoolIdentifier];
 

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

Similar Threads

Crosstab query has more problems 2
Crosstab query 1
Zeros in Crosstab Queries 1
True zeros in Crosstab 2
listings (records) in query 2
Crosstab totals incorrect 1
Crosstab query 1
Crosstab query result question 2

Top