• I think by just adding to the WHERE statement to Gianluca's fine example, you'd make sure you don't change fields where they already match, you'll prevent re-processing of the same rows...you might need to take nulls into account as well:

    DECLARE @rows int

    DECLARE @batchsize int

    SET @rows = 1

    SET @batchsize = 10000 -- whatever size you find appropriate

    WHILE @rows > 0

    BEGIN

    UPDATE TOP(@batchsize) a

    SET a.field1 = b.field1

    FROM table1 a

    INNER JOIN table2 b

    ON a.id = b.id

    WHERE a.status = -1

    AND a.field1 != b.field1

    --AND ISNULL(a.field1,'') != ISNULL(b.field1,'') --is there nulls?

    SET @rows = @@ROWCOUNT

    BACKUP LOG ...

    END

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!