Exception Handling

  • Hi,

    While inserting the values gets error because of certain problem. Can you please anyone give me the way to display the error message along with the field or value caused for error in catch block?

    For Example,

    Begin try

    Insert into emp values(.........)

    Insert into emp values(.........)

    Insert into emp values(.........)

    .

    .

    .

    End try

    Begin Catch

    End Catch

    I want to display which field or value causes error in multiple insert stmt. Please its urgent

    Thanks,

    Anitha

  • Hi Anitha

    I don't think there is a build-in functionality available.

    Greets

    Flo

  • Rather than programming by exception using Try/Catch, it would be better to precertify the data as "insertable" using a staging table.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

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

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