how to execute procedures one after the another in an script

  • 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

  • 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

  • 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;-)

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply