Home Forums SQL Server 7,2000 General Importing data from txt file and updating Table RE: Importing data from txt file and updating Table

  • quote:


    Something like this (Check it out in BOL):

    update <master_Table>

    set col1 = <temporary_table>.col1, col2 = <temporary_table>.col2 ....

    from <master_table>, <temporary_table>

    where <master_table>.<primary_key> = <temporary_table>.<primary_key>

    I don't think you acutally need the exists statement as the join has the same effect - i.e. selects existing rows.


    Cheers

    David