DB2 SQL-Error: -126
Short Description: THE SELECT STATEMENT CONTAINS BOTH AN UPDATE CLAUSE AND AN ORDER BY CLAUSE
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. Refer to Chapter 4 of DB2 SQL Reference for information about restrictions on the declarations for cursors to be used for update.