Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Declaring cursor to return another_cursor%rowtype problem

Declaring cursor to return another_cursor%rowtype problem

From: Frances Edelstein <rbs_at_super.zippo.com>
Date: 1996/12/06
Message-ID: <MPLANET.32a85920rbs98969b@snews.zippo.com>#1/1

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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US