![HP NonStop SQL/MX Скачать руководство пользователя страница 217](http://html.mh-extra.com/html/hp/nonstop-sql-mx/nonstop-sql-mx_messages-manual_165150217.webp)
Binder and Compilation Messages (4000 through
4999)
HP NonStop SQL/MX Messages Manual — 640324-001
6- 31
SQL 4118
Cause. You specified a join or a nonupdatable query in an updatable cursor query
(that is, one with an optional FOR UPDATE OF clause). A join query is not updatable.
Effect. The operation fails.
Recovery. An updatable cursor query should not specify a join or a nonupdatable
query. An SQL/MX statement cursor is updatable if all the following are true:
•
It is a SELECT statement.
•
There is only one table reference in the FROM clause, and there are no correlated
subquery references to that table. For example, this query is updatable:
SELECT A FROM T;
This one is not:
SELECT A FROM T WHERE B = (SELECT C FROM U WHERE
T.I. = U.I)
•
There are no aggregates.
•
There are no GROUP BY, DISTINCT, or ORDER BY clauses.
•
All select_list columns are column references.
•
No column reference occurs more than once in the select list.
This example of a nonupdatable cursor join query selects the target of the update
correctly and receives an error:
>>SELECT A.PROD_CODE, B.UPDATE_FLAG FROM EXPRODPARAMS A, MSRATES
B
+>WHERE CASE WHEN B.UPDATE_FLAG IS NULL THEN 'N' ELSE
B.UPDATE_FLAG END = 'N'
+>AND A.ACC_TYPE = B.ACC_TYPE AND A.PROD_CODE = B.PROD_CODE
+>FOR UPDATE OF UPDATE_FLAG ;
*** ERROR[4118] The cursor query expression is not updatable.
*** ERROR[8822] Unable to prepare the statement.
4118 The cursor query expression is not updatable.
Содержание NonStop SQL/MX
Страница 4: ......
Страница 8: ...Contents HP NonStop SQL MX Messages Manual 640324 001 iv ...
Страница 26: ...General Messages 0 through 999 HP NonStop SQL MX Messages Manual 640324 001 2 2 ...
Страница 130: ...SQL MX MXCMP Messages 2000 through 2999 HP NonStop SQL MX Messages Manual 640324 001 4 34 ...
Страница 186: ...Parser and Compilation Messages 3000 through 3999 HP NonStop SQL MX Messages Manual 640324 001 5 56 ...
Страница 242: ...Normalizer Messages 5000 through 5999 HP NonStop SQL MX Messages Manual 640324 001 7 2 ...
Страница 246: ...Optimizer Messages 6000 through 6999 HP NonStop SQL MX Messages Manual 640324 001 8 4 ...
Страница 248: ...Generator Messages 7000 through 7999 HP NonStop SQL MX Messages Manual 640324 001 9 2 ...
Страница 360: ...Trigger UDR Server and Language Manager Messages 11000 through 11399 HP NonStop SQL MX Messages Manual 640324 001 13 30 ...
Страница 472: ...Messages Generated by the Message System 16000 through 16999 HP NonStop SQL MX Messages Manual 640324 001 16 2 ...
Страница 614: ...Utility Messages 20000 through 23099 HP NonStop SQL MX Messages Manual 640324 001 18 138 ...
Страница 738: ...SQLSTATE Values Returned by NonStop SQL MX HP NonStop SQL MX Messages Manual 640324 001 21 86 SQLSTATE Values ...
Страница 752: ...Non SQLCODE Error Messages HP NonStop SQL MX Messages Manual 640324 001 A 14 MXGNAMES Utility ...