Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Invalid Cursor Error
We have the following as type 2 dynamic SQL:
insert into my_table (date_field, other_field)
select sysdate, other_field from my_table
where rowid = :bind_variable
;
It is prepared, then executed, but gets "duplicate key in index". The statement is then executed again immediately, and gets "invalid cursor (ORA-1001)".
Why?
This is very old code, but we know what it's trying to do, and how we would re-write it if we were allowed (we're not), but what we don't understand is why it gets the ORA-1001.
TIA Eric Received on Sat Apr 18 1998 - 11:46:53 CDT