FIX: Query Analyzer Truncates Output of COMPUTE Clause at Six Characters

This article was previously published under Q224986
This article has been archived. It is offered "as is" and will no longer be updated.
BUG #: 53975 (SQLBUG_70)
SYMPTOMS
When viewing results in SQL Query Analyzer, the output of a COMPUTE clause is truncated at six characters and may show incorrect information. This is a display problem only. If the query is run from another tool, such as ISQL.exe or OSQL.exe, the correct output is displayed.
WORKAROUND
Use another query tool, such as ISQL.exe or OSQL.exe to run the query.
STATUS

Microsoft has confirmed this to be a problem in SQL Server 7.0. This problem has been corrected in U.S. Service Pack 1 for Microsoft SQL Server 7.0. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
232570INF: How to Obtain Service Pack 1 for Microsoft SQL Server 7.0 and Microsoft Data Engine (MSDE) 1.0
For more information, contact your primary support provider.
MORE INFORMATION
The following script demonstrates the problem:
create table t1 (c1 int not null, c2 char(1) not null)goinsert t1 values (500000, 'a')insert t1 values (500000, 'a')insert t1 values (500001, 'b')insert t1 values (500001, 'b')select sum(c1) from t1 compute sum(sum(c1))				
In Query Analyzer, the following is displayed for the results:
----------- 2000002     sum===========200000				
Note that the final 2 is truncated from the sum in the COMPUTE clause.
compute truncate display graphical output isqlw.exe
Properties

Article ID: 224986 - Last Review: 10/20/2013 22:43:34 - Revision: 2.1

Microsoft SQL Server 7.0 Standard Edition

  • kbnosurvey kbarchive kbbug kbfix KB224986
Feedback
ERROR: at System.Diagnostics.Process.Kill() at Microsoft.Support.SEOInfrastructureService.PhantomJS.PhantomJSRunner.WaitForExit(Process process, Int32 waitTime, StringBuilder dataBuilder, Boolean isTotalProcessTimeout)