BUG: Select Statement Can Cause Arithmetic Overflow

Last reviewed: October 31, 1997
Article ID: Q155710

The information in this article applies to:
  • Microsoft SQL Server, versions 6.0 and 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:

    a. an integer constant multiplied by b. an integer returned from a function multiplied by c. 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. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.


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


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: October 31, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.