PRB: String Functions Cannot Be Used with SQL ORDER BY ClauseLast reviewed: October 29, 1996Article ID: Q157188 |
The information in this article applies to:
SYMPTOMSString functions such as LEFT(), RIGHT(), and SUBSTR() cannot be used with the ORDER BY clause of the SQL - SELECT statement. Doing so results in the following error message:
SQL Column '' is not found CAUSEORDER BY supports only columns either by name or number, it does not support any other expressions.
WORKAROUNDCreate a dummy column using the string function and then order by that column, as in the following example:
SELECT *,LEFT(Prod_name,5) AS x FROM PRODUCTS ORDER BY x STATUSThis behavior is by design.
MORE INFORMATION
Steps to Reproduce Behavior
|
KBCategory: kbprg kbprb
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |