Click here to Skip to main content
15,891,372 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have such a situation in my table:

group1 5 members
group2 0 members

The problem is when a group has 0 members its row is not displayed at all. I want it to report that it has 0 members.

Thanks..
Posted

1 solution

Just perform a LEFT JOIN from your list of all groups to the data that produces your member counts. Then just make sure you replace the NULL with a zero.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900