Calling an Oracle stored procedure which returns a REF cursor
699403May 30 2009 — edited May 31 2009Hi 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.