SQL/MP Messages Manual

SQL Compiler Binder Messages (4000 to 4999)
HP NonStop SQL/MP Messages Manual427720-006
6-5
SQL 4021
Cause. You specified a CREATE PROTECTION VIEW or DECLARE CURSOR
statement with the FOR UPDATE clause, but the defining query expression contained
expressions in the select list. A query expression with expressions in the select list
cannot be updated; therefore, you cannot use the expression to define a protection
view or a cursor that can be updated.
Effect. The statement fails.
Recovery. If the view is not to be updated, declare a shorthand view instead. If the
cursor is not to be updated, remove the FOR UPDATE clause.
SQL 4022
Cause. You specified a CREATE VIEW or DECLARE CURSOR statement with the
FOR UPDATE clause, and the defining query expression contained an ORDER BY
clause. A query expression with an ORDER BY clause is not allowed in the expression
to define a view or a cursor that can be updated.
Effect. The statement does not compile.
Recovery. Remove the ORDER BY clause from the view definition, or remove it from
the cursor definition that includes the FOR UPDATE clause.
SQL 4023
Cause. You specified a CREATE PROTECTION VIEW or DECLARE CURSOR
statement with the FOR UPDATE clause, but the defining query expression contained
a GROUP BY clause. A query expression with a GROUP BY clause cannot be
updated; therefore, you cannot use the expression to define a protection view or a
cursor that can be updated.
Effect. The statement fails.
Recovery. If you do not want to update the view, declare a shorthand view instead. If
you do not want to update the cursor, remove the FOR UPDATE clause.
4021 A protection view definition cannot contain expressions
in the select list.
4022 An ORDER BY clause is not allowed either in a view
definition or in a cursor definition that includes the FOR
UPDATE clause.
4023 A protection view or cursor definition used for update
cannot contain a GROUP BY clause.