Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 wait for sp to be executed

Author  Topic 

HenryFulmer
Posting Yak Master

110 Posts

Posted - 2011-05-25 : 12:55:31
I need to run two stored procedures consecutively, so that the second sp is not executed until the first sp is completed. How can I set up my query to do that?
Thanks for your help.

nigelrivett
Master Smack Fu Yak Hacker

3385 Posts

Posted - 2011-05-25 : 12:57:42
You can run them both from a controlling SP or from a job as consequtive steps (or commands in the same step but better as two)
Or you can get the first SP to log it's start and end in a tab le and pol for that.
Or call the second sp from the first.

Depends on your environment.


==========================================
Cursors are useful if you don't know sql.
SSIS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page
   

- Advertisement -