By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,806 Members | 1,465 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,806 IT Pros & Developers. It's quick & easy.

Showing records with 0 sum in a query

P: 5
Hey everyone,

I have a query displaying total customers within specific sectors using the groupby and sum arguments. The only issue being it doesn't display sectors with 0 customers at all (i would like it to list them with 0 total). I just wondered if there was a way of doing this or whether it will only ever show results with positive counts?

Thanks so much,

Dave
Mar 17 '07 #1
Share this Question
Share on Google+
1 Reply


MMcCarthy
Expert Mod 10K+
P: 14,534
Hey everyone,

I have a query displaying total customers within specific sectors using the groupby and sum arguments. The only issue being it doesn't display sectors with 0 customers at all (i would like it to list them with 0 total). I just wondered if there was a way of doing this or whether it will only ever show results with positive counts?

Thanks so much,

Dave
Hi Dave

You need a left join for this. If you post the SQL you are currently using I'll try to help fix it for you.

Mary
Mar 17 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.