Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 debugging "Divide by zero error encountered"

Author  Topic 

mike123
Master Smack Fu Yak Hacker

1462 Posts

Posted - 2007-07-19 : 09:48:03
Hi,

I have a query that I'm getting this error on. I'm wondering if there are any simple tricks to debugging SPROCS when this occurs?

I'm having problems figuring out exactly where the error is occuring, and also would like to know the best way to prevent this.

Thanks very much!
mike123

sshelper
Posting Yak Master

216 Posts

Posted - 2007-07-19 : 09:58:56
There are 3 ways of avoiding the Divide by zero error and you can refer to the following link for these:

http://www.sql-server-helper.com/error-messages/msg-8134.aspx
http://www.sql-server-helper.com/faq/select-p01.aspx (Question #10).

SQL Server Helper
http://www.sql-server-helper.com
Go to Top of Page

mike123
Master Smack Fu Yak Hacker

1462 Posts

Posted - 2007-07-19 : 10:34:55
thanks a bunch!

I still couldnt find the divide by zero error somehow, for now I have successfully used


SET ARITHABORT OFF
SET ANSI_WARNINGS OFF


Are there any downsides to using this ? Performance hits?


Thanks again,
Mike123
Go to Top of Page
   

- Advertisement -