-126   THE SELECT STATEMENT CONTAINS BOTH AN UPDATE CLAUSE AND AN ORDER BY CLAUSE

Explanation

The SELECT statement in the declaration for a cursor contains both an UPDATE clause and an ORDER BY clause. Unless you use a static sensitive scrollable cursor, an ORDER BY clause cannot be specified in the declaration for a cursor that is to be used for UPDATE.

System action

The statement cannot be processed. The cursor remains undefined in the application program.

Programmer response

The implied function is not supported by DB2®. A cursor that is to be used for update cannot be defined to fetch the rows of the object table in a specific order.

SQLSTATE

42829