Home » SQL & PL/SQL » SQL & PL/SQL » ORA-01410: invalid ROWID need help! (Oracle 10g)
icon9.gif  ORA-01410: invalid ROWID need help! [message #359165] Thu, 13 November 2008 23:58 Go to next message
HarshPandey
Messages: 1
Registered: November 2008
Location: Delhi
Junior Member

declare
emp_rec employees%rowtype;
cursor c_emp is
select * from employees where employee_id in(100,101,102)
for update of last_name;
begin
open c_emp;
loop
fetch c_emp into emp_rec;
dbms_output.put_line(to_char(emp_rec.EMPLOYEE_ID||' '||emp_rec.LAST_NAME);
update employees
set last_name='Ryan'
where current of c_emp;
end loop;
close c_emp;
commit;
end;
/

m very new to pl/sql n was just trying to dig in to 'for update of' n 'where current of' with cursors.i wrote the above pl/sql block n got an error--- 'ORA-01410: invalid ROWID'. the same block with implicit opening n closing of cursor using for loop works fine! can't figure it out! and ORA-01410 isnt there in the Oracle 10g documentation as well.
Re: ORA-01410: invalid ROWID need help! [message #359171 is a reply to message #359165] Fri, 14 November 2008 00:27 Go to previous message
prabhakarkamath
Messages: 15
Registered: February 2006
Junior Member
You are missing EXIT condition within the loop after FETCH condition. Put that code and try again

EXIT WHEN c_emp%NOTFOUND;
Previous Topic: PL/SQL concatenating other attribute while one attribute is equal
Next Topic: Oracle problem
Goto Forum:
  


Current Time: Thu Feb 13 10:49:58 CST 2025