PSS ID Number: 167602
Article Last Modified on 10/15/2002
The information in this article applies to:
- Microsoft SQL Server 6.0
- Microsoft SQL Server 6.5
- Microsoft SQL Server 7.0
- Microsoft SQL Server 2000 (all editions)
This article was previously published under Q167602
BUG #: 15699 (NT: 6.00)
16647 (6.50)
57616 (7.00)
224386 (SHILOH)
SYMPTOMS
If a SUM or AVG function is applied to a numeric field, the field loses
its precision and scale.
WORKAROUND
Use the CONVERT function to regain the precision and scale.
For example, in a case where a cursor declared to select AVG(<column>) and
fetch fails with error 16923, declare the cursor like the following:
declare cur_test cursor for
select convert(numeric(<precision>,<scale>),AVG(c1))
from table1
STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.
Keywords: kbBug kbDSupport kbusage KB167602
Technology: kbAudDeveloper kbSQLServ2000 kbSQLServ2000Search kbSQLServ600 kbSQLServ650 kbSQLServ700 kbSQLServSearch