Is it possible to alter varchar data in a SQL database?

Hi I have a database to is storing names in a table I.e customer table with the field both the first and lastnames are stored in this like peter pan. I have recently added a form that captures the username I.e as peter.pan is there a way to run a SQL statment that will alter only peter.pan like data and reformat to peter pan? Let me know if you require any additonal info. Thanks Adrian
Who is Participating?
Guy Hengel [angelIII / a3]Connect With a Mentor Billing EngineerCommented:
you mean
UPDATE yourtable
   SET yournamefield = REPLACE(yournamefield, '.', ' ')
 WHERE yournamefield LIKE '%.%'

Open in new window

Raja Jegan RSQL Server DBA & ArchitectCommented:
Hope this is what you meant:

update ur_table
set name =  replace(name, '.', ' ')

Kindly tell me if this doesn't helped you out with examples so that I can help further
adypipsAuthor Commented:
Many thanks spot on, this exactly what I am after. Many thanks
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.