Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> FETCH arbitrary columns from a ref_cursor
The problem is as follows:
I have a stored proc. that returns a types.ref_cursor (where
types.ref_cursor is defined as 'ref cursor'):
PROCEDURE P(c OUT TYPES.ref_cursor);
The returned cursor has a bunch of columns, but I only need a few of them.
Anyway, with FETCH INTO I have to provide variables for every column. So I
have to do this:
var1 Type1;
var2 Type2;
...
FETCH c INTO var1, var2, ..., var20, ... var_n;
Where Type1, etc. ... are as specified in the documentation of P. (Since I
couldn't find a way to determine the record type of an arbitrary
ref_cursor.)
Is there a way to make this type of situation easier?
Some solutions came into my mind, such as:
Unfortunately, I have found nothing like this either on the net or in the Oracle documentation.
Any ideas?
Thx Received on Tue Aug 17 2004 - 08:11:34 CDT
![]() |
![]() |