Advertisement

01.15.2008 at 08:30AM PST, ID: 23084412
[x]
Attachment Details

SQL 2005 Reporting Services - Aggregate Sum function with an IIf function

Asked by asoroudi in SQL Server 2005

Tags: SQL 2005 Reporting Services, Aggregate Sum function

I am getting an error involving the "=" in my SUM statement.  The error doesn't change whether it is '1' or 1.Start Free Trial
1:
2:
3:
4:
5:
6:
7:
SELECT     Office.OffName, SkillLevel.SkDesc, Employee.Emplname, Employee.Empfname, Employee.Empnum, SUM(IIf(WIP.Wbillable=1, WIP.Whours, NULL)) AS BillableHours
FROM         Employee INNER JOIN
                      Office ON Employee.Empoff = Office.OffID INNER JOIN
                      SkillLevel ON Employee.Emplevel = SkillLevel.SkID RIGHT OUTER JOIN
                      WIP ON Employee.ID = WIP.WempID
GROUP BY Office.OffName, Employee.Empnum, Employee.Emplname, Employee.Empfname, SkillLevel.SkDesc
ORDER BY Office.OffName, SkillLevel.SkDesc
[+][-]01.15.2008 at 09:21AM PST, ID: 20664435

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: SQL Server 2005
Tags: SQL 2005 Reporting Services, Aggregate Sum function
Sign Up Now!
Solution Provided By: Nightman
Participating Experts: 2
Solution Grade: A
 
 
[+][-]01.15.2008 at 02:43PM PST, ID: 20667493

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.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_EXPERT_20070906