-1013: Too many order
columns 
Explanation:
The
following causes of errors are possible:
-
More than 128 columns were
specified as sort criteria or group columns (see Technical
Specifications).
-
The total length of the
order or group columns exceeds 1020 bytes.
-
The length of the longest
result data type of a DISTINCT function,
together with the lengths of the group columns, exceeds 254 characters. The
result data type is the data type which is assigned to the result of an expression.
User
Action:
In the SQL statement, you must remove one or more
columns specified in the ORDER clause or GROUP
clause.