Invalid ORDER BY specification

Item Value
SQLCODE -152
Constant SQLE_INVALID_ORDER
SQLSTATE 53005
Sybase error code 108
ODBC 2 State 37000
ODBC 3 State 42000

Probable cause 

Either you used an integer in an ORDER BY list and the integer is larger than the number of columns in the select list, or you specified an ORDER BY expression that is semantically invalid. For example, with UNION queries you can only use integers to specify an ordering of the result.