• Marcus Farrugia (5/1/2013)


    Hi, I'm looking for the best way to update pkid 1 = pkid 2

    update testTable

    set

    a.fname = b.fname

    from

    (select * from testTable where pkid = 1) as a

    join

    (select * from testTable where pkid = 2) as b

    This:

    update dbo.testTable set

    fname = (select fname from dbo.testTable where pkid = 2)

    where

    pkid = 1;