Hi all,
I have a cursor defined in a Package for me to use with cursor
for-loops:
CURSOR c_abc IS SELECT a,b,c FROM tbl;
.
.
FOR rec IN c_abc LOOP...END LOOP;
And in the same Package there are several Procedures that return the
exact same query as an output parameter:
TYPE cur_type IS REF CURSOR;
PROCEDURE go(out_records OUT cur_type);
It is not possible to open "c_abc" and return it as "out_records", since
they are defined different types.
So I have to re-write the same query for "out_records":
OPEN out_records FOR "SELECT a,b,c FROM tbl";
Is there no way to define a cursor with this query only once and re-use
that definition each time?
Thanks,
Yuval.
This e-mail and any attachments may contain information that is confidential, proprietary, privileged or otherwise protected by law. The information contained herein is solely intended for the named addressee (or a person responsible for delivering it to the addressee). If you are not the intended recipient of this message, you are not authorized to read, print, retain, copy or disseminate this message or any part of it. If you have received this e-mail in error, please notify the sender immediately by return e-mail and delete it from your computer.
Oracle LazyDBA home page