do you mean this?UPDATE aSET a.attrtype = 'SON24'FROM attribute_VIEW aJOIN (select giftid,attrtype,sum(case when gifttype in ('b','g','y') then giftjntamt else 0 end)as Gifts,sum(case when gifttype = 'c' then giftjntamt else 0 end)as Credits from gifts with(readpast)left outer join attribute_VIEW with(readpast)on attrid=giftidwhere gifttype in ('b','c','g','y')and gifteffdat >='2009-07-01'group by giftid,attrtypehaving sum(giftjntamt)>=250)) bon b.giftid=a.giftidwhere a.attrtype <> 'SON24'make sure you run this in a transaction to see if result is desired and if not rollback