Insert only one particular transaction?

  • hi

    I am having a issue

    i have to insert Table A and Update Table B with say ID=3

    If there is any error then i have to rollback all transaction

    and insert into Table C as Rollback transaction for Id=3

    insert into TableA

    Select 3,'hi'

    Update TableB set values='hi' where Id=3

    if the above fails then ONLY i need to insert a Value in Table C i dont want to insert every record in TableC other than Failure only failure is recorded, only if i am going to Rollbcak Tran then only i need to Insert value in TableC

    Thanks

    Parthi

    Thanks
    Parthi

  • A TRY ...CATCH block might help.



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

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

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