FIX: Non-Compute Query Preceding Compute Query May Cause OSQL to Stop Responding

Article translations Article translations
Article ID: 246565 - View products that this article applies to.
This article was previously published under Q246565
This article has been archived. It is offered "as is" and will no longer be updated.
BUG #: 54999 (SQLBUG_70)
Expand all | Collapse all

SYMPTOMS

You have a script that contains two queries. The queries are not separated by a GO, both queries label column headers and the second query contains a COMPUTE clause. When you run this script using Query Analyzer, the second result set will not include the column headers. When you run the query using OSQL.exe the column headers will be returned, but you will see a dialog box that contains the following message:
osql.exe has generated errors and will be closed by Windows. You will need to restart the program.

An error log is being created.

WORKAROUND

You can use any one of the following workarounds:
  • Place a GO after the first query.
  • Remove the COMPUTE clause.
  • Run the script using ISQL.exe.

STATUS

Microsoft has confirmed this to be a problem in SQL Server 7.0. This problem has been corrected in U.S. Service Pack 2 for Microsoft SQL Server 7.0. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
254561 INF: How to Obtain Service Pack 2 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 this problem:
SELECT 'TEST' AS Header
SELECT category,Count(*) AS 'Header'
FROM master..sysobjects
GROUP BY category
COMPUTE sum(category)
				

Properties

Article ID: 246565 - Last Review: October 22, 2013 - Revision: 2.1
APPLIES TO
  • Microsoft SQL Server 7.0 Standard Edition
Keywords: 
kbnosurvey kbarchive kbbug kbfix KB246565

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com