Share via


SQL: ORDER BY clause is invalid (Error 1808)

One of the fields chosen for the ORDER BY clause is not in the SELECT list. This occurs only when using numeric indexing as in the following example where the number chosen exceeds the number of fields selected:

SELECT a,b,c FROM table ORDER BY 4

For more information, see SELECT - SQL.