-20165 AN SQL DATA CHANGE STATEMENT WITHIN A FROM CLAUSE IS NOT ALLOWED IN THE CONTEXT IN WHICH IT WAS SPECIFIED
Explanation
An SQL data change statement cannot be specified in the FROM clause in specific contexts.
The
SQL data change statement must be the only table-reference in
the FROM clause that is used in:
- the outer fullselect of a SELECT statement (a subselect)
- a SELECT INTO statement
An SQL data change statement cannot be specified in the FROM clause of a fullselect that is used in the default clause of the definition of a global variable.
System action
The statement cannot be processed.
Programmer response
Change the statement so that the SQL data change statement within a FROM clause is used in a supported context or is the only table-reference in the FROM clause.
SQLSTATE
428FL