• UPDATE A

    SET A.LocationCode = B.LocationCode

    FROM tableA A INNER JOIN tableB B ON A.id = B.id

    --Ramesh