-511   THE FOR UPDATE CLAUSE CANNOT BE SPECIFIED BECAUSE THE RESULT TABLE DESIGNATED BY THE SELECT STATEMENT CANNOT BE MODIFIED

Explanation

The result table of the SELECT statement cannot be updated. This error can occur if the SELECT specifies more than one table or view in the FROM clause, if the SELECT list contains a built-in function or DISTINCT, or if the statement contains an ORDER BY or GROUP BY or HAVING clause. This error can also occur if a view is specified in the FROM clause and the view cannot be updated, or if a data change statement is specified within the SELECT statement, for example: SELECT from INSERT.

System action

The statement cannot be processed.

Programmer response

Updates cannot be performed on the result table as it is specified.

SQLSTATE

42829