update row if exist else insert

  • i have a probelem in sqlserver 2005.

    i want to integrate data into a single intergration table from many other tables.

    all tables have some column names. and i want to bring the data such that if a entry in row is changed it should be updated , and if row doesnot exist is should be inserted.

    But probelem here is i have to compare 7-8 columns in a single row and then decide to update or not is there any solution.

    there are a lot of solution available but they compare 1 or 2 columns in a row only.

  • abhinav00sharma (11/5/2008)


    i have a probelem in sqlserver 2005.

    i want to integrate data into a single intergration table from many other tables.

    all tables have some column names. and i want to bring the data such that if a entry in row is changed it should be updated , and if row doesnot exist is should be inserted.

    But probelem here is i have to compare 7-8 columns in a single row and then decide to update or not is there any solution.

    there are a lot of solution available but they compare 1 or 2 columns in a row only.

    Use SSIS, or in the destination table create an INSERT trigger that will watch all the incoming data

    kshitij kumar
    kshitij@krayknot.com
    www.krayknot.com

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

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