I would ordinarily add an "Else 0" prior to the End in those case statements rather than the isnull function. Is there a performance difference, or just personal preference?
Puto me cogitare, ergo puto me esse. I think that I think, therefore I think that I am.