Start of change

-20547 THE STATEMENT FAILED BECAUSE THE TARGET OF AN ASSIGNMENT IS A READ-ONLY VARIABLE. VARIABLE NAME: variable-name.

Explanation

Global variables can generally be used as the target of an assignment in various SQL statements, with the appropriate write access. However, the definition of some global variables makes them read-only. This applies to some built-in global variables and also to user-defined variables that are defined using the CONSTANT clause. A variable that is read-only cannot be used in an SQL statement as the target of an assignment.

variable-name
The name of the variable that is read-only.

System action

The statement cannot be processed.

Programmer response

Change the target variable to a variable that is not read-only.

SQLSTATE

428I3

End of change