Advertisement

05.24.2007 at 11:25AM PDT, ID: 22593216
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

8.6

Show zeros if no data returned

Asked by tracimcp in MS SQL Server

Tags: , , ,

I am using the following SQL query for a SQL Report.  I want the Conditions to diplay with zeros if there isn't any data.  Right now it will just show ex. Arthritis and Depression and the results instead of showing All of the conditions.  Please help!  Urgent!

SELECT     CASE rf.SeqNo WHEN 1 THEN 'Arthritis' WHEN 2 THEN 'Asthma' WHEN 3 THEN 'Back pain' WHEN 8 THEN 'COPD' WHEN 9 THEN 'Depression' WHEN 10
                       THEN 'Diabetes' WHEN 11 THEN 'Heart disease' WHEN 12 THEN 'Heart failure' WHEN 13 THEN 'High blood pressure' END AS Title,
                              COUNT(*) AS Total,
                              COUNT(CASE rf.Value WHEN '1' THEN 1 ELSE NULL END) AS Mild, COUNT(CASE rf.Value WHEN '2' THEN 1 ELSE NULL END) AS Moderate,
                    COUNT(CASE rf.Value WHEN '3' THEN 1 ELSE NULL END) AS Severe, COUNT(CASE rf.Value WHEN '4' THEN 1 ELSE NULL END) AS Incomplete,
                      COUNT(CASE rf.Value WHEN '5' THEN 1 ELSE NULL END) AS Followup
FROM         tbOSetItem AS osi INNER JOIN
                      vuRspField AS rf ON rf.RspId = osi.ObjId
WHERE     (osi.OSetId = 58880) AND (rf.QFldName = 'diseaseimpact')
GROUP BY rf.SeqNo
ORDER BY rf.SeqNoStart Free Trial
[+][-]05.24.2007 at 11:31AM PDT, ID: 19151613

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 14-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.24.2007 at 11:41AM PDT, ID: 19151680

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 14-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.24.2007 at 11:50AM PDT, ID: 19151749

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 14-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.24.2007 at 11:56AM PDT, ID: 19151794

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 14-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.24.2007 at 12:25PM PDT, ID: 19152063

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 14-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.24.2007 at 12:33PM PDT, ID: 19152136

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 14-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.24.2007 at 12:42PM PDT, ID: 19152204

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 14-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.25.2007 at 12:23AM PDT, ID: 19155142

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 14-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.25.2007 at 08:38AM PDT, ID: 19157767

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 14-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.25.2007 at 08:45AM PDT, ID: 19157842

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 14-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.25.2007 at 09:30AM PDT, ID: 19158184

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 14-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.25.2007 at 11:08AM PDT, ID: 19158871

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 14-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.25.2007 at 12:05PM PDT, ID: 19159258

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 14-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.25.2007 at 12:21PM PDT, ID: 19159371

View this solution now by starting your 14-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: MS SQL Server
Tags: sql, count, data, show
Sign Up Now!
Solution Provided By: ScottPletcher
Participating Experts: 5
Solution Grade: A
 
 
 
Loading Advertisement...
20081112-EE-VQP-43