access group by aand count

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a query that group by distinct name from a table and count how many
arraived to some place (arraived =1 , count how many 1 for each name) it
works great , only if a name has not have at least one "1" it doesnt show him
on the list.
i want it to show name and in the field arraived show "0" or nothing null.
this is the query:
SELECT SEPTEMBER10.mazmin_name, Count(SEPTEMBER10.arraived) AS
countarraived
FROM SEPTEMBER10
GROUP BY SEPTEMBER10.mazmin_name, SEPTEMBER10.arraived
HAVING (((SEPTEMBER10.arraived)=1));
who can help?
thanks in advance
alon
 
You may want to consider revisiting your data structure before you try to
work out how to query it.

From your description, you have a table named "SEPTEMBER10". It is not a
good idea, from a relational database (Access) design viewpoint, to embed
data (September, i.e., a month-name) in the name of a table.

Without a better idea of the domain/subject area and your specific data,
it's a bit tough to offer specific suggestions. A general suggestion might
be to consolidate all your "month" tables into a single table, to which you
add a DateOfXXXX field. Then, when you wish to know "month" information, a
simple query will let you find the Month(DateOfXXXX).
 
Back
Top