Home » SQL & PL/SQL » SQL & PL/SQL » Executing procedure using procedure (Oracle8i, unix)
Executing procedure using procedure [message #310158] Mon, 31 March 2008 07:53 Go to next message
etl_prasad
Messages: 44
Registered: June 2005
Location: Scotland
Member
Hi all,
is it possible to execute procedure using another procedure

CREATE OR REPLACE PROCEDURE_NAME IS 
BEGIN

EXECUTE ANOTHER_PROCEDUREN_NAME;

END PROCEDURE_NAME;


my requirement is that i ahve four procedures which are interdependent and i want to execute one by one, so i tried this option please advice what could be best option.

Thanks in advance..Smile
Re: Executing procedure using procedure [message #310160 is a reply to message #310158] Mon, 31 March 2008 08:03 Go to previous messageGo to next message
Michel Cadot
Messages: 64152
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Yes just name it.
EXECUTE is a SQL*Plus command.
In PL/SQL you just have to name the procedure.

Regards
Michel
Re: Executing procedure using procedure [message #310168 is a reply to message #310160] Mon, 31 March 2008 08:13 Go to previous messageGo to next message
etl_prasad
Messages: 44
Registered: June 2005
Location: Scotland
Member
Here is my procedure

CREATE OR REPLACE PROCEDURE PRC_EXECUTE IS

BEGIN

EXECUTE PRC_LOAD_SRC1;

EXECUTE PRC_LOAD_SRC2;

EXECUTE PRC_LOAD_SRC3;

EXECUTE PRC_LOAD_SRC4;


END PRC_EXECUTE;
/


when i compile this procedure using TOAD am getting following error

Quote:
PLS-00103: Encountered the symbol "PRC_LOAD_SRC1" when expecting one of the following:

:= . ( @ % ; immediate
The symbol ":=" was substituted for "PRC_LOAD_SRC1" to continu
Re: Executing procedure using procedure [message #310174 is a reply to message #310168] Mon, 31 March 2008 08:20 Go to previous messageGo to next message
Michel Cadot
Messages: 64152
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:
EXECUTE is a SQL*Plus command.
In PL/SQL you just have to name the procedure.

Remove EXECUTE.

Regards
Michel
Re: Executing procedure using procedure [message #310178 is a reply to message #310174] Mon, 31 March 2008 08:32 Go to previous message
etl_prasad
Messages: 44
Registered: June 2005
Location: Scotland
Member
Thanks a lot,, its working now...


Previous Topic: How to drop the database
Next Topic: How to know which select statement is raising error
Goto Forum:
  


Current Time: Sat Dec 10 10:54:43 CST 2016

Total time taken to generate the page: 0.08155 seconds