I want to replace a specific word in a sentence but not in a substring.
Like
DECLARE @i VARCHAR(250)
SET @i = 'MR JOHN NAMR is working from 3 days.'
PRINT REPLACE(@i, 'MR ', '')
Output :
'JOHN NAis working from 3 days.'
Like in this I want to replace 'MR ' with an empty string. But if you see it is replacing 'MR ' from 'NAMR ' as well.
Kindly suggest a solution.