We have a master procedure which calls many procedures inside as shown below.
exec SP1
exec SP2
exec SP1
We observe the procedure SP1 is triggered and immediately procedure SP2 also triggered. The second line does not wait for completion of execution of first line.
I tried using WAITFOR DEALY and it works in few places but not in all places as I do not know how much time I need to wait for the 1st procedure to complete its execution.
Please help me with any other option available to wait till the first procedure or sql gets complete.



