BUG: Zero May Be Negative, Depending on the Numeric ScaleLast reviewed: April 16, 1997Article ID: Q165376 |
The information in this article applies to:
SYMPTOMSDepending 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 WORKAROUNDTo 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.
STATUSMicrosoft 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 : kbbug6.50 kbusage SSrvGen
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |