Contents Index Illegal FOR XML EXPLICIT tag value: '%1' Illegal reference to correlation name '%1'

ASA Error Messages
  Database Error Messages
    Alphabetic list of error messages

Illegal ORDER BY in aggregate function


Item Value
SQLCODE -904
Constant SQLE_INVALID_ORDERBY_IN_AGGREGATE
SQLSTATE 42W90
Sybase error code 13579
ODBC 2 State 37000
ODBC 3 State 42000
Probable cause 

An ORDER BY can be used in an aggregate function only if there are no DISTINCT aggregates in the SELECT list, or there is a single DISTINCT aggregate with the DISTINCT column equal to the first column of the ORDER BY. Also, multiple ordered aggregates cannot be used in the same SELECT list unless they have the exact same ORDER BY clause.


Contents Index Illegal FOR XML EXPLICIT tag value: '%1' Illegal reference to correlation name '%1'