Article ID: 246201 - View products that this article applies to.
This article was previously published under Q246201
BUG #: 56519 (SQLBUG_70)
The ORDER BY clause of a SELECT statement may be ignored when the sub-select statement also contains an ORDER BY clause. For example, the following query returns results in the wrong order:
The three results rows should be ordered "Hunter", "Karsen", "Locksley" but the results are reversed.
Instead of using "*" to return all columns in the table, specify the column names explicitly. The following query works as expected:
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:
254561For more information, contact your primary support provider.
(http://support.microsoft.com/kb/254561/ )INF: How to Obtain Service Pack 2 for Microsoft SQL Server 7.0 and Microsoft Data Engine (MSDE) 1.0
Contact us for more help
Connect with Answer Desk for expert help.