Home » SQL & PL/SQL » SQL & PL/SQL » call procedure with OUT parameter inside another procedure (10.0.1.1)
call procedure with OUT parameter inside another procedure [message #411475] Sat, 04 July 2009 03:28 Go to next message
mrpranab
Messages: 32
Registered: March 2005
Member
Hi,

How to call a procedure which has OUT parameter from inside another procedure?

Procedure del_prc(table_name varchar2, id varchar2, errorid out varchar2, errmesg out varchar2).

Procedure clean_prc(p_tbl_nm varchar2, p_id varchar2).

I am calling a package procedure named clean_prc from a pl/sql block. The package procedure (clean_prc)
called another package procedure from different schema whose name is del_prc which has IN and OUT parameters.
How to call del_prc procedure with OUT parameter from clean_prc procedure pl/sql block?

Example:-

declare
tab_nm varchar2(30);
job_id varchar2(50);

begin

select table_name, jobid into tab_nm, job_id from x where y=y;

execute immediate ' call ' ||
' clean_prc('''||
tab_nm||''', '''||
job_id||''')';

end;

---------------------

Procedure clean_prc(p_tbl_nm varchar2, p_id varchar2) as

Begin

Execute immediate ' call ' ||
'<schema>.<package>.del_prc('||
p_tbl_nm||', '||
p_id||', '||
<???>||', '||
<???>||')';

End;

How <???> this can be replaced?

Thank you.
Re: call procedure with OUT parameter inside another procedure [message #411479 is a reply to message #411475] Sat, 04 July 2009 03:36 Go to previous messageGo to next message
Michel Cadot
Messages: 64116
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
From your previous questions:
Michel Cadot wrote on Sat, 27 June 2009 08:09
Also please read OraFAQ Forum Guide, especially "How to format your post?" section.
Use code tags and align the columns in result.
Use the "Preview Message" button to verify.

BlackSwan wrote on Wed, 20 May 2009 06:31
You need to help us by following the Posting Guidelines as stated below.
http://www.orafaq.com/forum/t/88153/0/
Go to the URL above click the link "Posting Guidelines"
Go to the section labeled "Practice" & do as directed.

Post DDL for tables.
Post DML for test data.

Post expected/desired results.

Please do it.

Also search BEFORE posting, EXECUTE IMMEDIATE is clearly explained in details in the documentation with examples.

Regards
Michel

Re: call procedure with OUT parameter inside another procedure [message #411504 is a reply to message #411479] Sat, 04 July 2009 07:39 Go to previous messageGo to next message
mrpranab
Messages: 32
Registered: March 2005
Member
I got the answer in the documentation.

Thanks.
Re: call procedure with OUT parameter inside another procedure [message #411514 is a reply to message #411504] Sat, 04 July 2009 09:35 Go to previous message
Michel Cadot
Messages: 64116
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Good! Next time search it before posting.

Regards
Michel

Previous Topic: Faster way to update large amount of data
Next Topic: ORA-06550,PLS-00201 error
Goto Forum:
  


Current Time: Tue Dec 06 02:19:07 CST 2016

Total time taken to generate the page: 0.13016 seconds