Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

how to execute procedures one after the another in an script Expand / Collapse
Author
Message
Posted Wednesday, September 24, 2008 9:55 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, September 29, 2008 4:42 AM
Points: 6, Visits: 15
I have Script in which it contains one batch file followed by two procedures in it

my requirement is when we run script first batch file should run after completion of batch file run only it should go to 2nd ,3rd procedures

for example..

my script

declare @...

exec batch_file
exec proce2
exec proc 3


once completion of batch file execution the curosr should start execution of 2nd procedure
Post #575352
Posted Wednesday, September 24, 2008 11:21 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Friday, June 27, 2014 12:43 PM
Points: 13,872, Visits: 9,596
I guess I don't understand the question. Stuff in a script is run in the order it's in the script.

If you have a batch, and then two procs, it will run the batch, and then run the two procs. In that order.


- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread

"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
Post #575434
Posted Thursday, September 25, 2008 3:55 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Tuesday, October 21, 2014 2:36 AM
Points: 2,840, Visits: 3,970
My dear

your example will get executed as u desired bcoz execution is done in the same sequence as u write in your sql script


-------Bhuvnesh----------
I work only to learn Sql Server...though my company pays me for getting their stuff done
Post #575819
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse