SQL -Update XML column

 

declare @new_rating int

set @new_rating = 0

 

 

UPDATE [member_plan_wrapper_extraction]

SET asset_mix.modify('replace value of (/asset_mix/mem_plan/@plan_allocate_rating)[1] with sql:variable("@new_rating") ')

WHERE owner_id=@owner_id

and mpln_member = @mpln_member

and mpln_owner = @mpln_owner

and pln_cb_id=@pln_cb_id ;