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 2000 Forums
 SQL Server Development (2000)
 Error #8115 Arithmetic overflow error

Author  Topic 

whiterabbot
Starting Member

18 Posts

Posted - 2008-11-26 : 18:15:20
My code is as follows,
select (case WHEN (convert(int, cast(DryBulbCelcius as decimal)*100))/100 < -50 THEN NULL WHEN (convert(int, cast(DryBulbCelcius as decimal )*100))/100 > 60 THEN NULL ELSE (convert(int, cast(DryBulbCelcius as decimal)*100))/100 END) AS temperature, DryBulbCelcius FROM wban_bef_timestamp ,

and when I run this code I keep getting Arithmetic overflow error. Does anyone know how I can fix this problem?

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2008-11-26 : 18:34:55
[code]SELECT CASE
WHEN ROUND(DryBulbCelcius, 0) < -50 THEN NULL
WHEN ROUND(DryBulbCelcius, 0) > 60 THEN NULL
ELSE ROUND(DryBulbCelcius, 0)
END AS temperature,
DryBulbCelcius
FROM wban_bef_timestamp[/code]


E 12°55'05.63"
N 56°04'39.26"
Go to Top of Page

whiterabbot
Starting Member

18 Posts

Posted - 2008-11-26 : 18:42:25
Never mind I fixed the problem, there were characters for some of the entries that I did not see the before.
Go to Top of Page
   

- Advertisement -