BUG: STR() Inconsistent with Exact Numeric DataLast reviewed: April 9, 1997Article ID: Q154000 |
The information in this article applies to:
SYMPTOMSThe STR() function does not consistently truncate or round exact numeric data.
STATUSMicrosoft 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.
MORE INFORMATIONThe problem is illustrated in the following scenario, where the STR() function truncates for the first case, and rounds for the second:
declare @x1 numeric(8,6), @x2 numeric(8,6) select @x1 = 12.104375, @x2 = 12.128175 select str(@x1, 9, 5) STR, round(@x1, 5) ROUND select str(@x2, 9, 5) STR, round(@x2, 5) ROUND |
Additional query words:
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |