count output including 0 results in group by

Last Post 25 Aug 2006 07:17 AM by jtabio. 1 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
jtabio
New Member
New Member

--
25 Aug 2006 06:28 AM
Having a table A with one of the cols being STATE, and a table B with all the states listed in col b.State;
how can it will include in count output results 0 , for GROUP BY col A.State without any records?
I know how to use GROUP BY ALL, but is not usable in this case, when there is not any WHERE criteria.
Desire output should look like:

A.STATE Count
============
AL _______ 100
AK _______ 0
AZ _______ 3
...
WY_______ 0
jtabio
New Member
New Member

--
25 Aug 2006 07:17 AM
Thank you, russellb!!
Have a nice weekend.
You are not authorized to post a reply.

Acceptable Use Policy