how to ignore error message in sql

  • I have one procedure in which suppose I got error on 10 lines then ignore that error message and execute next link.

    How I can handle this?

    please tell me

  • i want to block the system message.

    exception handling is possible in sql .if yes the how it can be handle?

  • Try:

    Exec('your sql command')

    If @@Error<>0 do something...

    Exec('your sql command')

    If @@Error<>0 do something...

    Exec('your sql command')

    If @@Error<>0 do something...

    With this method individual SQL command failures will not stop the entire batch.



    PeteK
    I have CDO. It's like OCD but all the letters are in alphabetical order... as they should be.

  • In SQL2000 the 'if @@error' coding construct will work but is dependent on the 'severity' level of the error encountered and a 'set' option or two for the session.

    SQL 2K5 has the 'try/catch' construct for this type of processing.

    RegardsRudy KomacsarSenior Database Administrator"Ave Caesar! - Morituri te salutamus."

Viewing 4 posts - 1 through 4 (of 4 total)

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