Home » SQL & PL/SQL » SQL & PL/SQL » calling procedure inside a procedure (Oracle 9)
calling procedure inside a procedure [message #377321] Mon, 22 December 2008 06:14 Go to next message
shaksing
Messages: 115
Registered: November 2008
Senior Member
Hi

I have a stored procedure p1 inside a stored procedure p2 , and name of the procedure p1 is inside a variable v1 , and i need to run or call the procedure which is stored in v1 with some input parameters.

Re: calling procedure inside a procedure [message #377323 is a reply to message #377321] Mon, 22 December 2008 06:19 Go to previous messageGo to next message
trivendra
Messages: 208
Registered: October 2007
Location: Noida, India
Senior Member
HI,

Can you post what you have tried.

Thanks
Trivendra
Re: calling procedure inside a procedure [message #377325 is a reply to message #377321] Mon, 22 December 2008 06:36 Go to previous messageGo to next message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
And don't forget to read OraFAQ Forum Guide, especially "How to format your post?" section.
Make sure that lines of code do not exceed 80 characters when you format.
Indent the code (See SQL Formatter), use code tags.
Use the "Preview Message" button to verify.
Also always post your Oracle version (4 decimals).

Regards
Michel
Re: calling procedure inside a procedure [message #377422 is a reply to message #377325] Mon, 22 December 2008 23:43 Go to previous messageGo to next message
panyam
Messages: 146
Registered: May 2008
Senior Member
Hi Shasking,

Check over here u will get the answer :

http://dbaforums.org/oracle/index.php?showtopic=10328
Re: calling procedure inside a procedure [message #377465 is a reply to message #377321] Tue, 23 December 2008 03:17 Go to previous message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
I think what you're looking for is Native Dynamic SQL.

CREATE OR REPLACE PROCEDURE t_1 (p_1 in varchar2) as
BEGIN
  dbms_output.put_line(p_1);
end;
/

declare
  v_sql  varchar2(1000);
begin

  v_sql := 'BEGIN t_1(:1); END;';
  execute immediate v_sql using 'test text';

end;
/
Previous Topic: Serialize an existing table
Next Topic: Table join with distinct records
Goto Forum:
  


Current Time: Sat Dec 03 20:37:27 CST 2016

Total time taken to generate the page: 0.08718 seconds