BJCooperIT
Programmer
We have a function that is part of a database package. This function returns a Ref Cursor. I am coding a different package and need to use this function. I have searched the existing threads and not found clear-cut answers.
This, although riddled with errors, is what I would like to logically accomplish:
1. What is the syntax of the PL/SQL to use this function and process the rows returned from the Ref Cursor?
2. Can I declare a %rowtype based on the function's Ref Cursor data?
Beware of false knowledge; it is more dangerous than ignorance. ~George Bernard Shaw
Consultant Developer/Analyst Oracle, Forms, Reports & PL/SQL (Windows)
My website: Emu Products Plus
This, although riddled with errors, is what I would like to logically accomplish:
Code:
declare
type V_CURSOR is ref cursor;
V_REC UTIL_PKG.F_GET_LODGING%rowtype;
begin
V_CURSOR := UTIL_PKG.F_GET_LODGING(4568,2006);
loop
fetch V_CURSOR
into V_REC;
exit when V_CURSOR%notfound;
DBMS_OUTPUT.PUT_LINE(V_REC.CHECK_OUT_TIME);
end loop;
close V_CURSOR;
end;
2. Can I declare a %rowtype based on the function's Ref Cursor data?
Beware of false knowledge; it is more dangerous than ignorance. ~George Bernard Shaw
Consultant Developer/Analyst Oracle, Forms, Reports & PL/SQL (Windows)
My website: Emu Products Plus