| |
- Causa
- AN EXPRESSION IN THE FOLLOWING POSITION, OR STARTING WITH position-or-expression-start IN THE clause-type CLAUSE IS NOT VALID.
REASON CODE = reason-code.
The expression identified by the first part of the expression expression-start in the clause-type clause is not valid for the reason specified by
the reason-code as follows:
- The fullselect of the select-statement is not a subselect.
Expressions are not allowed in the ORDER BY clause for this type of select-statement.
This reason code occurs only when clause-type is ORDER BY.
- DISTINCT is specified in the select clause, and either a column name in the ORDER BY clause cannot be matched exactly with a column name in the
SELECT list, or a sort-key-expression is specified in the ORDER BY clause.
This reason code occurs only when clause-type is ORDER BY.
- Ação do sistema
- The statement cannot be executed.
- Resposta ao Desenvolvedor
- Modify the select-statement based on the reason specified by the reason-code as follows:
- Remove the expression from the ORDER BY clause.
If attempting to reference a column of the result, change the sort key to the simple-integer or simple-column-name form.
See the ORDER BY syntax diagram in the DB2 SQL Reference for more information.
- Remove DISTINCT from the select clause.
SQLSTATE: 42822
© Copyright IBM Corp.
|
| |