Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Cursor on PL/SQL table
Hi all,
Can anyone tell me, please, if there's any way to return a cursor on a PL/SQL table?
I have something close to the following:
TYPE a_tbl IS TABLE OF Atbl%ROWTYPE INDEX BY BINARY_INTEGER; TYPE a_cur IS REF CURSOR;
PROCEDURE Foo(a_row IN OUT a_cur) IS
tbl_a a_tbl;
CURSOR c1 IS SELECT * FROM Atbl;
i INTEGER;
BEGIN
i := 0;
OPEN c1;
LOOP
i := i + 1; FETCH c1 INTO tbl_a(i); EXIT WHEN c1%NOTFOUND;
Now I need to be able to loop through tbl_a and return the rows in the cursor a_row.
END; No matter what I try, and I've tried plenty, I can't see how to do. There's no examples in any of the books I've got, can't find a sample on the web and there's nothing that I can see in the help.
Any assistance greatly appreciated.
TIA --
This post is made entirely from recycled ones and noughts
![]() |
![]() |