The reason that you do not get null, blank count is that you have NO blanks and nulls to be summed, because you are filtering them out in the WHERE clause:
AND (RegSelServ IN (@yes, @no) )
Your query takes only yes and no's.
Change it to:
AND (RegSelServ IN (@yes, @no, @NA, @Blank) OR RegSelServ is NULL)
Main Topics
Browse All Topics





by: BJTurnerPosted on 2009-10-28 at 08:23:22ID: 25684258
Does changing the Blank and oNull really give you the times it false through to the Else? You still have the 1 on the When clause? I am unsure what you are wanting here. The Then clause will give you how many blanks and nulls. Everything else is totalled in your other sums. The total of all the sums should be the total of all the records in the group.