micheal__og
micheal__og

Reputation: 69

How to remove special characters from a string completely in sql server

update myTable set Column = REPLACE(Column,'₦', '')
I tried to remove the naira with the above command but it's not just working for me.

Upvotes: 1

Views: 3157

Answers (2)

Prashant Kumar Singh
Prashant Kumar Singh

Reputation: 61

UPDATE Dummy set myColumn = replace(myColumn,'abc','xyz');

where abc is character that you want to remove from mycolumn and xyz is substring that u want to replace with the special character

Upvotes: 0

John Cappelletti
John Cappelletti

Reputation: 81960

Update myTable set [Column] = REPLACE([Column],N'₦', '')  -- Assuming nvarchar()

You should try to avoid Reserved Words.

https://msdn.microsoft.com/en-us/library/ms189822.aspx

Upvotes: 2

Related Questions