The following lines contain the word 'select', 'insert', 'update' or 'delete':
/* p_selSt : The select statement which return the rowids of all
* the rows that have a null value.
* p_updSt : The update statement which fills the null values with
* some default value.
*/
l_rowIdBulk DBMS_SQL.Varchar2_Table; -- Array to hold the rowids.
curSel NUMBER; -- Cursor for select statement
curUpd NUMBER; -- Cursor for update statement
* Bind an array to hold the selected rowid.
* Execute the query to get the data to buffer.
*/
curSel := DBMS_SQL.OPEN_CURSOR;
/* Create the cursor for the update statement.
* The dynamic update query is parsed.
*/
curUpd := DBMS_SQL.OPEN_CURSOR;
* We try update for a max of 6 times.
*/
FOR j IN 1..6 LOOP
BEGIN
/* Read the column value into the array */
DBMS_SQL.COLUMN_VALUE(curSel, 1, l_rowIdBulk);
/* Bind the array to the update cursor */
DBMS_SQL.BIND_ARRAY(curUpd, ':1',l_rowIdBulk );