Advertisement

02.08.2005 at 09:41AM PST, ID: 21306570
[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!

9.0

SP Help handling null values in a a/b calculation, runs but does not update recordset...

Asked by jimhorn in MS SQL Server

Tags: , ,

--  This sp, when run, generates errmsg 'Warning: Null value is eliminated by an aggregate or other SET operation.  (250 row(s) affected)'
--  When I look at my table, all values are nulls.
--  I have tried this as a View, and it does return non-null values and divides/rounds correctly.  

--  Question:  Does the below sp fragment handle NULL values correctly?  TIA.

UPDATE tdds
SET month_current_sales_percent_of_total =
  CASE WHEN (vtdss.sales_by_disease_state_by_month IS NULL) OR (tdds.month_current_sales IS NULL) THEN 0 ELSE
    CASE WHEN (vtdss.sales_by_disease_state_by_month = 0) OR (tdds.month_current_sales = 0) THEN 0 ELSE
      Round(tdds.month_current_sales / CAST(vtdss.sales_by_disease_state_by_month AS money(10)),3)
    END
  END
FROM er_trpt_department_by_disease_state tdds
    INNER JOIN vw_trpt_department_by_disease_state_sales_summary vtdss ON vtdss.chmd_disease_state_cd = tdds.chmd_disease_state_cd
WHERE (tdds.month_id = 200507)
Start Free Trial
 
Loading Advertisement...
 
[+][-]02.08.2005 at 10:36AM PST, ID: 13257037

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]02.08.2005 at 12:13PM PST, ID: 13258049

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 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02.08.2005 at 12:20PM PST, ID: 13258113

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]02.08.2005 at 12:24PM PST, ID: 13258151

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 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02.08.2005 at 01:01PM PST, ID: 13258603

View this solution now by starting your 7-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: null, handling, sp
Sign Up Now!
Solution Provided By: ScottPletcher
Participating Experts: 3
Solution Grade: A
 
 
[+][-]02.08.2005 at 01:02PM PST, ID: 13258617

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 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02.08.2005 at 01:07PM PST, ID: 13258666

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 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02.08.2005 at 01:07PM PST, ID: 13258668

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 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02.08.2005 at 01:20PM PST, ID: 13258823

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 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02.12.2005 at 12:14PM PST, ID: 13294920

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 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080924-EE-VQP-38