Declare @p varbinary(16),@postion int,@rplen int
Select @p=textptr(Context),@rplen=len(@s_str),@postion=charindex(@s_str,Context)-1 from tb
while @postion >= 0 -------------------------------修改地方------
begin
updatetext tb.Context @p @postion @rplen @d_str
select @postion=charindex(@s_str,Context)-1 from tb
end
Declare @p varbinary(16),@postion int,@rplen int
Select @p=textptr(Context),@rplen=len(@s_str),@postion=charindex(@s_str,Context)-1 from tb
while @postion>0
begin
updatetext tb.Context @p @postion @rplen @d_str
select @postion=charindex(@s_str,Context)-1 from tb
end
Declare @p varbinary(16),@postion int,@rplen int
Select @p=textptr(Context),@rplen=len(@s_str),@postion=charindex(@s_str,Context)-1 from tb
while @postion>0
begin
updatetext tb.Context @p @postion @rplen @d_str
select @postion=charindex(@s_str,Context)-1 from tb
end