Hi there,
I have recently noticed that I am unable to combine the 'WHERE CURRENT OF ' and 'RETURNING .. INTO .. ' clauses in the same UPDATE statement ( when processing cursor rows in a PL/SQL block). It's not a big problem but I can't think of a logical reason why this is not allowed. A sample update and the error message are displayed below where c_emp is the name of a previously declared CURSOR:
UPDATE employee
SET salary = r_emps.salary
WHERE CURRENT OF c_emp
RETURNING salary INTO r_emps.salary;
RETURNING salary INTO r_emps.salary;
*
ERROR at line 37:
ORA-06550: line 37, column 6:
PL/SQL: ORA-00933: SQL command not properly ended
Can anyone out there enlighten me?
I have recently noticed that I am unable to combine the 'WHERE CURRENT OF ' and 'RETURNING .. INTO .. ' clauses in the same UPDATE statement ( when processing cursor rows in a PL/SQL block). It's not a big problem but I can't think of a logical reason why this is not allowed. A sample update and the error message are displayed below where c_emp is the name of a previously declared CURSOR:
UPDATE employee
SET salary = r_emps.salary
WHERE CURRENT OF c_emp
RETURNING salary INTO r_emps.salary;
RETURNING salary INTO r_emps.salary;
*
ERROR at line 37:
ORA-06550: line 37, column 6:
PL/SQL: ORA-00933: SQL command not properly ended
Can anyone out there enlighten me?