July 30, 2005 at 1:47 am
How to i tackle Divide by Zero errors.
Since sometimes my value of @Share is Zero.
And I get a Divide By Zero error that affects by SQL query. How do i tackle this?
July 30, 2005 at 3:52 am
You can handle the divide-by-zero exceptions by using SET ARITHABORT ON/OFF switches. For more help, u can refer BOL. All the best
July 30, 2005 at 5:32 am
I have done this...Is this right..
SET ARITHABORT OFF
SET ARITHIGNORE ON
SET ANSI_WARNINGS OFF
July 30, 2005 at 6:47 am
Raj, you can do these settings and prevent the QA from showing you the exception messages, but the recommended approach would be to check the variable in tsql and then perform the divide operations...
i mean something like what sushila has put above e.g. if(@Share > 0)
Viewing 4 posts - 76 through 78 (of 78 total)
You must be logged in to reply to this topic. Login to reply