Ansicht
Dokumentation

SQL0510 - Cursor &1 for table or view &2 read-only. ( OS/400 )

SQL0510 - Cursor &1 for table or view &2 read-only. ( OS/400 )

rdisp/max_wprun_time - Maximum work process run time   Addresses (Business Address Services)  
This documentation is copyright by IBM.
SAP E-Book


Message : SQL0510
Cursor &1 for table or view &2 read-only.

Message Long Text :

Cause . . . . . : An UPDATE or DELETE statement with a WHERE CURRENT OF clause was specified, but the cursor is read only. Either the cursor &1 is read-only or the view or logical file &2 in schema &3 is read-only.

A view or logical file is read-only if one or more of the following conditions are true:
-- The view contains a DISTINCT keyword, GROUP BY clause, HAVING clause, an aggregate function, or UNION, EXCEPT, or INTERSECT in the outer-most subselect.
-- The view or logical file contains a join.
-- The view contains a subquery that refers to the same table as the table of the outer-most subselect.
-- All the columns of the view are expressions, scalar functions, or constants.
-- All the columns of the logical file are input only.

A cursor is read only if one or more of the following conditions is true:
-- The DECLARE CURSOR statement specified an ORDER BY clause but did not specify a FOR UPDATE OF clause.
-- The DECLARE CURSOR statement specified a FOR READ ONLY clause.
-- The DECLARE CURSOR statement specified the SCROLL keyword without DYNAMIC.
-- The cursor referred to a read-only view or logical file in the select list.
-- The fullselect specified in the DECLARE CURSOR statement contains any of the above restrictions that would make a view read only.
-- A second INSTEAD OF trigger is required for the update or delete on a dependent view.
-- The DECLARE CURSOR statement specified a SELECT with a data change table reference.
Recovery . . . : Do one of the following and precompile the program again:
-- If the DECLARE CURSOR statement specified an ORDER BY clause but not a FOR UPDATE OF clause, add a FOR UPDATE OF clause.
-- If the DECLARE CURSOR statement specified a FOR READ ONLY clause, remove the FOR READ ONLY clause.
-- If the DECLARE CURSOR statement specified the SCROLL keyword, specify DYNAMIC SCROLL.
-- If the referred to view or logical file is read only, remove the UPDATE or DELETE statement.
-- If the DECLARE CURSOR statement contains any conditions that make the cursor read only, remove the UPDATE or DELETE statement.

Message File : QSQLMSG
Library Message File : QSYS2924


ABAP Short Reference   CPI1466 during Backup  
This documentation is copyright by IBM.

Length: 3265 Date: 20240329 Time: 113837     sap01-206 ( 2 ms )