[SOLVED] Remove special characters from a database field


I have a database with several thousand records, and I need to strip down one of the fields to ensure that it only contains certain characters (Alphanumeric, spaces, and single quotes). What SQL can I use to strip any other characters (such as slashes, etc) from that field in the whole database?


update mytable
set FieldName = REPLACE(FieldName,'/','')

That’s a good place to start.

Answered By – Vinnie

Answer Checked By – Terry (BugsFixing Volunteer)

Leave a Reply

Your email address will not be published. Required fields are marked *