更新时间:2023-11-15 14:46:16
您可以尝试以下查询。
You can try the following query. Here at the start and end a space has been inserted first and then removed that space.
DECLARE @i VARCHAR(250)
SET @i = 'MR JOHN NAMR is working from 3 days.'
SELECT rtrim(ltrim(Replace(replace(' '+@i+' ',' MR ',' '),
' MR ',' ')))
输出如下所示
JOHN NAMR从3天开始工作。
JOHN NAMR is working from 3 days.
您可以找到实时演示 Demo Replace Word
You can find the live demo Demo Replace Word