[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

10/30/2007 at 03:38PM PDT, ID: 22928555
[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.2

Include Null Values SQL query VWD 2005

Asked by accessloans in SQL Query Syntax, MS SQL Server, Visual Studio

Tags: null, include, sql, query

I am using the query below which extracts the commissions in, commissions out and the commission total when the status id is not 21,22 and 27. The status date must be the current month and have a loan type of 9. All are grouped to lenders. The number of cases assigned to each lender are counted.ed to them yet but i need to extract them also. Is there a way that if the case has no lender then the lender column has the cases with no lender grouped as No Lender Cases.

Example

Lender                   Total Cases                 Comm In             Comm Out                Comm Total

Dummy Lender            40                             23,000               20,000                      3,000
No Lender Cases         8                                 0                      1000                        -1000    <-----Null Cases

Just now the GridView only shows Dummy Lender even though the the null cases exist.

SELECT Lender.Company, COALESCE (COUNT(CaseProcessing.StatusID), 0) AS Cases, COALESCE (SUM(vw_Case_CommissionTotal.CommissionIn), 0) AS [Comm In], COALESCE (SUM(vw_Case_CommissionTotal.CommissionOut), 0) AS [Comm Out], COALESCE (SUM(vw_Case_CommissionTotal.CommissionNet), 0) AS [Comm Net] FROM CaseDetails INNER JOIN CaseProcessing ON CaseDetails.CaseID = CaseProcessing.CaseID INNER JOIN CaseUnderWriting ON CaseDetails.CaseID = CaseUnderWriting.CaseID INNER JOIN Lender ON CaseUnderWriting.LenderID = Lender.ID INNER JOIN vw_Case_CommissionTotal ON CaseProcessing.CaseID = vw_Case_CommissionTotal.caseid WHERE (MONTH(CaseProcessing.StatusDate) = MONTH(GETDATE())) AND (YEAR(CaseProcessing.StatusDate) = YEAR(GETDATE())) AND (CaseDetails.LoanTypeID = 9) AND (CaseProcessing.StatusID <> 21 AND CaseProcessing.StatusID <> 22 AND CaseProcessing.StatusID <> 27) GROUP BY Lender.Company ORDER BY Lender.Company
 
Keywords: Include Null Values SQL query VWD 2…
 
Loading Advertisement...
 
[+][-]10/30/07 03:52 PM, ID: 20181790

View this solution now by starting your 30-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

Zones: SQL Query Syntax, MS SQL Server, Visual Studio
Tags: null, include, sql, query
Sign Up Now!
Solution Provided By: JR2003
Participating Experts: 1
Solution Grade: A
 
 
 
Loading Advertisement...
20091111-EE-VQP-91 / EE_QW_2_20070628