Removing special characters from column

How would I remove special charaters (/) from my fname column. the position of these characters are not predictable. I would like to have Space instead of this character in my table.
the records are somthing like this
'X/YZ'
'AB/C'
Please suggest.
parpaaAsked:
Who is Participating?
 
CluskittCommented:
Or you can even drop the where part. It will simply update all records, regardless of having a / or not. When it doesn't, it updates to the same value, though.
0
 
CluskittCommented:
UPDATE table
SET fname=REPLACE(fname,"/","")
WHERE fname LIKE '%/%'
0
 
ThomasianCommented:
SELECT REPLACE(fname, '/', ' ') FROM tablename

Open in new window


OR to replace the values permanently:

UPDATE tablename SET fname = REPLACE(fname, '/', ' ') WHERE fname LIKE '%/%'

Open in new window

0
 
parpaaAuthor Commented:
Thanks very much
It worked perfectly
0
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.