FIX: "CREATE INDEX" in Form Causes ASC or DESC to be Removed in an ORDER BY Clause

ID: Q218967


The information in this article applies to:
  • Microsoft SQL Server versions 6.5 Service Pack 5 and 5a, 7.0
  • Microsoft SQL Server, Enterprise Edition, version 7.0
  • Microsoft SQL Server, Desktop Edition, version 7.0

BUG #: 54138 (SQL 7.0)

SYMPTOMS

When using ODBC driver SQLSRV32.DLL version 3.70.0623, if you send a batch to SQL Server that contains a "CREATE INDEX" in any form (even commented out) and a SELECT statement follows it with an ORDER BY clause, which includes the optional ASC or DESC keyword, then the ASC or DESC will be removed from the query by the ODBC driver when it is sent to the server. The ASC or DESC is replaced with spaces and the query does not function as it was written.

With the noted ODBC driver and an ODBC application, this bug can be seen with SQL Server 6.5 and 7.0.


RESOLUTION

A supported fix that corrects this problem is now available from Microsoft, but it has not been fully regression tested and should be applied only to systems experiencing this specific problem. If you are not severely affected by this specific problem, Microsoft recommends that you wait for the next SQL Server service pack that contains this fix.

To resolve this problem immediately, contact Microsoft Product Support Services to obtain the fix. For a complete list of Microsoft Product Support Services phone numbers and information on support costs, please go to the following address on the World Wide Web:

http://www.microsoft.com/support/supportnet/overview/overview.asp



   Date       Version      File name      Platform
   -----------------------------------------------------------

   2/19/99    7.00.0641    sqlsrv32.dll   Intel 


NOTE: Due to file dependencies, the most recent hotfix or feature that contains the above files may also contain additional files.



STATUS

Microsoft has confirmed this to be a problem in SQL Server version 7.0.

Additional query words:

Keywords : kbSQLServ700bug kbSQLServ650sp5bug
Version : WINDOWS:7.0; winnt:6.5 Service Pack 5 and 5a,7.0
Platform : WINDOWS winnt
Issue type : kbbug


Last Reviewed: January 21, 2000
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.