Multiple stored procedures within a stored procedure and waiting

Go To StackoverFlow.com

0

I have seen several posts similar to this but none with a strait forward answer. Sorry if this is a stupid question, I have taught myself SQL and am still learning.

I have a stored procedure that a user starts from an Excel document. That stored procedure runs several other stored procedures. These internal stored procedures need to run in sequence. My question is, will stored procedure 2 wait for stored procedure 1 to finish before starting?

I need to make sure that the second one does not start before the first one finishes.

2012-04-03 20:07
by PopeScooby
What RDBMS are you using ( Oracle, SQL-Server? - they all use different procedural languages ) and what have you done so far - Ben 2012-04-03 20:10


2

As Ben indicates, it would be helpful to specify which database you're using because every database's procedural extensions to SQL (PL/SQL in Oracle, T-SQL in SQL Server, etc.) are different. That being said, however, I am not aware of any database that would do anything other than have stored procedure 1 run to completion, then run stored procedure 2. That's true of any procedural language, whatever is on line N of a procedure has to run to completion before whatever is on line N+1 of that procedure can run.

2012-04-03 20:27
by Justin Cave
Thanks for the quick clear answer - PopeScooby 2012-04-03 20:55
Ads