Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

sys_refcursor resultset

874273Jan 28 2014 — edited Jan 28 2014

Hi Masters,

I have created a function which will return result set from emp table. I have to utilize this resultset in another procedure/function. Is it possible?

I have writtne a function like this..

create or replace function test (v_sal in number) return sys_refcursor is

v_cur sys_refcursor;

begin

   open v_cur for select * from emp where sal>=v_sal;

   return v_cur;

end;

SQL> select test(2000) from dual;

6 rows displayed.

I need to use this records to filter in another subprogram? is it possible? Please advise..!!!

Regards

AP

This post has been answered by Hoek on Jan 28 2014
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 25 2014
Added on Jan 28 2014
3 comments
3,317 views