renee35
MIS
- Jan 30, 2007
- 199
I have the below formula:
Case when sum(isnull(o.payrate,0)) = 0 then 0 else sum(o.payrate)/count (distinct o.candidateid)
What I need to say is:
Case when sum(isnull(count (distinct o.candidateid),0)) = 0 then 0 else sum(o.payrate)/count (distinct o.candidateid)
But I can't use count (distinct o.candidateid) in the sum(Isnull) function because it returns an error about can't use within an aggregate function.
Please Help!!
Thanks a bunch!!
-T
Case when sum(isnull(o.payrate,0)) = 0 then 0 else sum(o.payrate)/count (distinct o.candidateid)
What I need to say is:
Case when sum(isnull(count (distinct o.candidateid),0)) = 0 then 0 else sum(o.payrate)/count (distinct o.candidateid)
But I can't use count (distinct o.candidateid) in the sum(Isnull) function because it returns an error about can't use within an aggregate function.
Please Help!!
Thanks a bunch!!
-T