calling another procedure in a stored procedure [message #376186] |
Tue, 16 December 2008 07:51 |
shaksing
Messages: 115 Registered: November 2008
|
Senior Member |
|
|
I want to call a stored procedure (p2) inside another stored procedure (p1) , passing one input parameter(i1) in p2.
EXECUTE IMMEDIATE 'call COMPACTAR_TABLA ( master_table )';
I tried this one but its not working.
If i dont want to use dynamic query than how can i call the stored procedure.
|
|
|
|
|
Re: calling another procedure in a stored procedure [message #376191 is a reply to message #376186] |
Tue, 16 December 2008 07:57 |
JRowbottom
Messages: 5933 Registered: June 2006 Location: Sunny North Yorkshire, ho...
|
Senior Member |
|
|
Just call it exacly like you would from an anonymous Pl/SQl block.
Here's an examply showing procedure p1 calling procedure p2 and passing a parameter:
CREATE OR REPLACE PROOCEDURE p2 (p_1 in varchar2) AS
BEGIN
dbms_output.put_line(p_1);
END;
/
CREATE OR REPPLACE PROCEDURE p1 (param_1 in varchar2
,param_2 number) AS
BEGIN
p2(param_1||param_2);
END;
/
|
|
|
|