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!

Calling an Oracle stored procedure which returns a REF cursor

699403May 30 2009 — edited May 31 2009
Hi Guys,

I am trying to call an Oracle stored procedure which returns a REF CURSOR. Here is the piece of code that i am working on:

procedure TC307_MAIN(p_program varchar2, p_project varchar2,p_engchgno varchar2, result_set OUT eng_cur) as
begin
IF (p_program = 'RNZN' and p_project = 'PROTECTOR-BUILD') THEN
result_set := guest.Tc307_Eng_Chg_Rpt.TC307_RNZN(p_engchgno, result_set => );
END IF;
end TC307_MAIN;

procedure TC307_RNZN(p_engchgno varchar2, result_set IN OUT eng_cur) as
begin
end TC307_RNZN;

The PL/SQL code behind TC307_RNZN is pretty big, that's why i haven't pasted it here. Basically, the second stored procedure executes a PLSQL statement and returns a result set. I need to return the result_set from the main procedure based on a nested if else statement which i am still in the process of building. I am getting a compilation error...can someone guide me with the correct method of calling the second stored procedure and returning it from the main procedure.

Many thanks.
This post has been answered by SanjayRs on May 31 2009
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 28 2009
Added on May 30 2009
7 comments
588 views