assuming v_name in your procedure's open statement above is actually p_name then try this...
add the IN OUT options to your p_name parameter
create or replace procedure v_name(p_name IN OUT <refcursor datatype>) is
begin
open p_name for select empno,sal from emp where deptno=10;
end;
create or replace procedure call_it
as
v_cursor <same refcursor type as in your other procedure>;
v_record <record type of your ref cursor>;
begin
v_name(v_cursor);
loop
fetch v_cursor into v_record;
exit when v_cursor%NOT_FOUND;
-- add whatever processing on v_record you want here....
end loop;
close v_cursor;
end;
Main Topics
Browse All Topics





by: mmoorePosted on 2008-08-12 at 15:50:31ID: 22217771
You can not say:
open v_name
because v_name is the name of your procedure. Can you please show actual code including the definition of your ref_cursor?