The information in this article applies to:
SYMPTOMSIf a SUM or AVG function is applied to a numeric field, the field looses its precision and scale. WORKAROUND
Use the CONVERT function to regain the precision and scale.
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 INFORMATION
With a limited amount of testing, the SUM function seems to get a precision
of 38 and retains the scale. The AVG function seems to get a precision of
38 and a scale of six if the original scale was less than six; otherwise,
it retains its scale. This problem does not occur with MAX or MIN
functions. You can observe this behavior with a table created with select
into or with a view.
Keywords : kbusage SSrvTran_SQL kbbug6.50 kbbug6.00 |
Last Reviewed: April 9, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |