Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 10.0.1 » SQL Anywhere 10 - Error Messages » Database Error Messages » Alphabetic list of error messages

Illegal FOR XML EXPLICIT tag value: '%1' Next Page

Illegal ORDER BY in aggregate function


Item

Value

Constant

SQLE_INVALID_ORDERBY_IN_AGGREGATE

ODBC 2 State

37000

ODBC 3 State

42000

Severity

15

SQLCODE

-904

SQLSTATE

42W90

Sybase error code

13579

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.