Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

UPDATE CURRENT Problem

29515Oct 8 2001
I am using Oracle8i Release 8.1.6.0.0, and now I encounter an
error when running the following PL/SQL Block:


1 declare
2 cursor c1 is
3 (select k1, f1 from geotab1)
4 for update of f1;
5 cursor c2 (key_k1 in geotab1.k1%type) is
6 (select f2 from geotab2
7 where k1 = key_k1);
8 begin
9 for rec in c1 loop
10 open c2 (rec.k1);
11 fetch c2 into rec.f1;
12 if c2%found then
13 update geotab1
14 set f1 = rec.f1
15 where current of c1;
16 end if;
17 close c2;
18 end loop;
19* end;
update geotab1
*
ERROR at line 13:
ORA-06550: line 13, column 10:
PLS-00801: internal error [22602]
ORA-06550: line 13, column 10:
PL/SQL: SQL Statement ignored


Note that the field k1 is the primary key of geotab1, and k2 is
the primary key of geotab2. When I replace the "where current of
c1" with "where k1 = rec.k1", the error is fixed and the program
block update geotab1 correctly.

I suppose the "where current of" clause works, but I have no
idea on the meaning of the internal error [22602]. What's going
wrong? Should I patch the Oracle Server?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 5 2001
Added on Oct 8 2001
2 comments
185 views