Topic: error on altering many SPs in the same QA window

  • Buddies,

      I get an SQL error message such as "alter procedure statement should be on the top of other alter statements" when I open only one QA window to re-compile multiple stored procedures (SPs). In otherwords, in the same QA window instance, I get that error when runing batch scripts like:

     

    alter procedure myprocedure1

    ...

     

    alter procedure myprocedure2

    ...

     

      The problem is gone when I re-compile one stored procedure in a separate QA window.

      Can somebody please have any idea for me of how I can run multiple "alter procedure..." batch statements in the same QA window isntance?

      Thanks so much in advance.

    Johnsql

  • Make sure to place a GO statement after each SP you are modifying. 

    If this isn't the problem, could you post some example code so we can see exactly what you are working with?

  • Shawn,

      Thanks for your great hint. I add the GO statement after each SP and the batch script works fine.

    Johnsql

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

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