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!

Call multiple stored procedures

Status
Not open for further replies.

WelshyWizard

IS-IT--Management
Apr 23, 2006
89
GB
Really easy question for you guys...

How on earth do I call multiple stored procedures? I've got 2 procedures, sp_ADDCOLS and sp_SPLITDIMS, all I want is some SQL that allows me to run sp_ADDCOLS and then sp_SPLITDIMS.

I'm sure it's very simple but it's driving me mad!

Today is the tomorrow you worried about yesterday - and all is well.....
 
Code:
EXEC sp_ADDCOLS <parameters here>
EXEC sp_SPLITDIMS <parameters here>

Other way is to add one additional parameter to sp_ADDCOLS that will tell you if you want to call sp_SPLITDIMS from it:
Code:
ALTER PROCEDURE sp_ADDCOLS 
.....,
@IWantTOCallSP bit = 0
AS
   ......
   IF @IWantTOCallSP = 1
      EXEC sp_SPLITDIMS


Borislav Borissov
VFP9 SP1, SQL Server 2000/2005.
MVP VFP
 
On a similar thread is it possible to call 2 proceures to run concurrently?

I love deadlines. I like the whooshing sound they make as they fly by
Douglas Adams
(1952-2001)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top