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
 Transact-SQL (2000)
 POWER() Function and Arithmetic overflow

Author  Topic 

sharonchapman
Starting Member

35 Posts

Posted - 2001-10-17 : 19:09:21
I have the following expression:

[Inflation Adjusted Total] = CASE WHEN ([In Service Year] - [Estimate Base Year]) = 0 then 0 else
POWER(Convert(Decimal(15,1),((dbo.v_ProjectTotalCosts.[Total Job Incl IDC]*(Convert(Decimal(15,1),[contingency]/100+1)))*
(1+Convert(Decimal(15,1),[Inflation Rate]/100)))),(Convert(Float(24),([In Service Year] - [Estimate Base Year])))) END,

Total Job Incl IDC = 3061.00
Contingency = 10.0
Inflation Rate = 3.0
In service yr = 2002
Estimate Base Year = 2001

I get the error message: Arithmetic overflow error converting expression to data type float.

If I remove the Power() and just subtract the dates from the expression, it works. When I add the Power(), I get the above error.

Can someone help me?
   

- Advertisement -