Unexpected Replace results

Using the following UPDATE statement, I do not get the results I expect.
Update WSWebProductName set ProductNameTextHtml = Replace(ProductNameTextHtml,'%'+Char(153)+'%','™') where IDNo = 382

Open in new window

In the field ProductNametextHTML there are trademarks which I can find using the where clause:
Where ProductNameTextHtml like '%' + Char(153) + '%'

I am trying to replace the Char(153) with the HTML text ™. When I run the query in Visual Basic or in SSMS, I am notifield one record is updated. But when I view the record in SSMS the TM is still there and not the ™. When I run the query again, I get feed back that one record was affected.
The Field ProductNametextHTML is a varchar(50) field.

Why is the REPLACE not working? What is the correct way to accomplish the replacement?
Who is Participating?
as long as IDno=382 uniquely identifies the row, you don't need the % symbols - just do this:

 Replace(ProductNameTextHtml, Char(153) ,'™')
mpdillonAuthor Commented:
Thanks. That was it.
I was using 382 as an example but there are hunreds of there records that need replacing.

I'm not sure why I thought it was necessary to identify specific rows.  The update will work just fine for the whole table.  :)
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.