Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Declaring cursor to return another_cursor%rowtype problem
The documentation says you can declare a cursor as returning another_cursor%rowtype after another_cursor has been declared.
The following compiles but produces a runtime error: ORA-06550 00707 unsupported construct or internal error[2601]:
cursor c1 return table_name%rowtype;
cursor c1 return c1%rowtype;
The following works:
cursor c1 return table_name%rowtype;
var1 c1%rowtype;
cursor c2 return var1%rowtype;
These are in a package specification (the cursor bodies are in the body). The test for working is a simple PL/SQL block run in SQL*Plus:
begin
for crec in package_name.c2 loop
null;
end loop;
end;
/
I'm using PL/SQL 2.2.2.3.1. Does anyone know if this is a bug or a feature? Can this be done in other versions of PL/SQL?
Thanks for any help,
Fran Received on Fri Dec 06 1996 - 00:00:00 CST
![]() |
![]() |