Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Package that executes two Stored Procedures

Status
Not open for further replies.

GROKING

Programmer
Mar 8, 2005
26
US

hello,

I would like to execute 2 stored procedures by calling both of them from the same Package. I would like to execute/run the Package in SqlPlus, actually a cron script. I think I can do this without needing a Package Body. I do not know how to declare the two Stored_Procedures which are already compiled separately on the database.

***********************************
CREATE OR REPLACE PACKAGE "OWB_STAGE_LOAD2" IS

NICHECOM_TRAN_CRED_DAILYLOAD PROCEDURE

system_global_date DATE := SYSDATE

BEGIN

/* Run Stored Procedures to insert Previous Day into Stage Tables */


ITEMS_DAILYLOAD; --Stored Procedure 1

TRAN_CRED_DAILYLOAD; --Stores Procedure 2

EXCEPTION
--NOT NEEDED

END OWB_STAGE_LOAD2;

*********************************

Then to run with SqlPlus :
EXECUTE WB_STAGE_LOAD2.ITEMS_DAILYLOAD;
EXECUTE WB_STAGE_LOAD2.TRAN_CRED_DAILYLOAD;

I have not found any documentation on this type of situation, any help is welcome.
Thanks!!
 
It can't be done the way you describe. Whats wrong with simply calling the procedures direct?
Code:
EXEC ITEMS_DAILYLOAD;
EXEC TRAN_CRED_DAILYLOAD;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top