Lynn Pettis (1/27/2010)
lmu92 (1/27/2010)
Seems like I totally missed the point. Sorry about that... :blush:
Okay, I'm lost on how you are lost. Please, what did you miss? It was your post that I based my response on that seemed to fix the problem.
I thought of using ISNULL() as a replacement of NULLIF() which was a wrong recommendation for the given scenario.
The solution I proposed can only be used to eliminate the division by NULL but not the division by Zero.
Since the OP stated to have both error messages I finally figured that "I missed the point" (= did not consider all information provided & used the wrong function).
Regarding laying the base for your post: All I did was extracting the code snippet I thought to be the root cause of the error. But my conclusion was wrong.
Lutz
A pessimist is an optimist with experience.
How to get fast answers to your question[/url]
How to post performance related questions[/url]
Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]