• ronan.healy (10/15/2012)


    update acrt

    set dbo.ACRT.MIDIRB = dbo.IRBT.IRBRATING

    from acrt,IRBT

    where dbo.IRBT.id = dbo.IRBT.id +1

    and NEGWATCH = 1

    It won't update any rows because dbo.IRBT.id will never equal dbo.IRBT.id +1.

    Write it as a SELECT first, so that it returns the correct ACRT rows to update with the correct values from IRBT. It's easy to check and simple to convert into an UPDATE.


    [font="Arial"]Low-hanging fruit picker and defender of the moggies[/font]

    For better assistance in answering your questions, please read this[/url].


    Understanding and using APPLY, (I)[/url] and (II)[/url] Paul White[/url]

    Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]