FIX: Select Statement Can Cause Arithmetic Overflow

ID: Q155710


The information in this article applies to:
  • Microsoft SQL Server versions 6.0, 6.5

BUG #: 15785 (6.50) 15607 (6.00)

SYMPTOMS

In general, when you use the Select statement and a query that involves the multiplication of a decimal number and the value returned from a function, an Arithmetic Overflow error message appears. This error message also appears in the following three specific conditions:

  1. Calculation must involve at least three operands


  2. Calculation must include the following three operations:

    1. an integer constant multiplied by


    2. an integer returned from a function multiplied by


    3. a decimal or numeric value in the form of either a constant, local variable or a column value.




  3. Calculation be performed in the order in which they are listed in Condition 2 above.




WORKAROUND

To work around this problem, convert the decimal or numeric values to integer values using the Convert function. For more information on how to use the Convert function, please see the Transact-SQL Reference guide.


STATUS

Microsoft has confirmed this to be a problem in Microsoft SQL Server versions 6.0 and 6.5. This problem has been corrected in U.S. Service Pack 4 for Microsoft SQL Server version 6.5. For more information, contact your primary support provider.

Keywords : kbnetwork SSrvGen SSrvTran_SQL kbbug6.50 kbbug6.00
Version : 6.0 6.5
Platform : WINDOWS
Issue type : kbbug


Last Reviewed: April 2, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.