Results 1 to 2 of 2

Thread: set goto Error_done???

  1. #1
    Join Date
    Nov 2008
    Posts
    1

    set goto Error_done???

    Hi guys and gals.

    Just wanted to know why in ms sql 2000 this line would be allowed to compile

    if @@error <> 0 begin set goto Error_Done end

    We notice this error when we migrated to ms sql 2005 and did some compatibilty testing.

    Changed code to

    if @@error <> 0 goto Error_Done for the sp to run.

  2. #2
    Join Date
    Sep 2002
    Posts
    5,938
    Because it's valid command in sql2k.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •