Microsoft KB Archive/231159

= BUG: Arithmetic Overflow Error when Using the Power Function =

Article ID: 231159

Article Last Modified on 10/3/2003

-

APPLIES TO


 * Microsoft SQL Server 6.5 Service Pack 5a

-



This article was previously published under Q231159



BUG #: 18720 (SQLBUG_65)



SYMPTOMS
When a Power function operates on an integer value within a multiplication or division statement, if that statement also contains a floating point value, the following error message occurs:

Arithmetic overflow occurred.

For example, the following query statement returns the error message: select 9520.00 / power(2,4)



WORKAROUND
  Replace the integer value inside of the Power function with a numeric value. For example: select 9520.00 / power(2.0,4)

-or-   Use a local variable to store the result of the power function and then use the local variable in the multiplication or division statement. For example: declare @val float select @val = power(2,4) select 9520.00 / @val 



STATUS
Microsoft has confirmed this to be a problem in SQL Server 6.5 Service Pack 5a.

Keywords: kbbug kbpending KB231159

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.