Microsoft KB Archive/165376

= BUG: Zero May Be Negative, Depending on the Numeric Scale =

Article ID: 165376

Article Last Modified on 10/3/2003

-

APPLIES TO


 * Microsoft SQL Server 6.5 Standard Edition

-



This article was previously published under Q165376



BUG #: 16672



SYMPTOMS
Depending on numeric scale, a negative sign may be generated for the value of zero.

The following scripts demonstrate the problem:

declare @i numeric(28,5), @j numeric(28, 5), @k numeric(28,5) select @i = 0.0 select @j = -1.0 select @k = @i * @j select @i, @j, @k

where @k = 0.00000 versus

declare @i numeric(28,6), @j numeric(28, 6), @k numeric(28,6) select @i = 0.0 select @j = -1.0 select @k = @i * @j select @i, @j, @k

where @k = -0.000000



WORKAROUND
To work around this problem, adjust the scale to avoid generating a negative zero. For example, use any scale between 1 and 5 to work around the problem described in the scenario above.



STATUS
Microsoft has confirmed this to be a problem in Microsoft SQL Server version 6.5. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

Keywords: kbbug kbpending kbusage KB165376

-

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

© Microsoft Corporation. All rights reserved.