Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Unable to use combination of WHERE CURRENT OF and RETURNING

Status
Not open for further replies.

bogman

Instructor
Jan 15, 2002
13
0
0
GB
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?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top