FIX: Mathematical Operations on Numeric or Decimal Columns with Negative Numbers May Return Unexpected Results

Article translations Article translations
Article ID: 275608 - View products that this article applies to.
This article was previously published under Q275608
This article has been archived. It is offered "as is" and will no longer be updated.
BUG #: 58371 (SQLBUG_70)
BUG #: 55457 (SQLBUG_70)
Expand all | Collapse all

SYMPTOMS

If you perform multiplication or division operations on numeric or decimal data types that have negative values, you may see unexpected results.

WORKAROUND

If the value -0 is already stored in a numeric or decimal column, and you want to make a comparison with 0 (zero), use the ABS Transact-SQL function on the column.

For example, if the value is in a column named nvalue, the WHERE clause of the query would look like this:
WHERE ABS(nvalue) = 0.0 
				

STATUS

Microsoft has confirmed this to be a problem in SQL Server 7.0. This problem has been corrected in U.S. Service Pack 3 for Microsoft SQL Server 7.0. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
274799 INF: How to Obtain Service Pack 3 for Microsoft SQL Server 7.0 and Microsoft Data Engine (MSDE) 1.0
For more information, contact your primary support provider.

Properties

Article ID: 275608 - Last Review: October 21, 2013 - Revision: 2.0
APPLIES TO
  • Microsoft SQL Server 7.0 Standard Edition
Keywords: 
kbnosurvey kbarchive kbbug kbfix kbqfe kbcodesnippet KB275608

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com