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
 General SQL Server Forums
 New to SQL Server Programming
 Divide by zero error encountered.

Author  Topic 

shemayb
Posting Yak Master

159 Posts

Posted - 2007-12-03 : 10:55:44
How can i handle this kind of error in my execution of my storedprocedure? Error:Divide by zero error encountered.

thanks!

Funnyfrog

RickD
Slow But Sure Yak Herding Master

3608 Posts

Posted - 2007-12-03 : 10:56:56
Do not let it divide by zero? - sorry, couldn't resist.

You could always do an isnull(col,1)
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-12-03 : 10:58:12
Or use the CASE keyword.



E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page

shemayb
Posting Yak Master

159 Posts

Posted - 2007-12-03 : 18:14:35
thanks!

Funnyfrog
Go to Top of Page
   

- Advertisement -