how to create a conditional Alter Statement

  • No problem, glad I could help.

    You should probably move the update statement inside the try block. If there is an error that will be caught by the try (for example the table does not exist, or deadlock) then the update will fail as well.



    Dan Guzman - Not the MVP (7/22/2010)
    All questions have to be prefaced by Server version and 'according to MS Docs' or 'my own personal opinion based on how much detail I felt like digging into at the time.'

Viewing post 16 (of 15 total)

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