Welcome to WebmasterWorld Guest from 54.234.38.8

Forum Moderators: open

Message Too Old, No Replies

Search and replace characters in a MySQL table

     
4:06 am on Jun 15, 2012 (gmt 0)

Full Member

5+ Year Member Top Contributors Of The Month

joined:Sept 30, 2009
posts:222
votes: 0


I discovered I incorrectly imported data into my database as some accented characters are corrupted.

For example, instead of "Tucumn" I get "Tucumán".

I've made changes to this data so I don't want to dump it and reimport it but try to salvage it if I can.

I noticed each character corrupts the same way:

=>á
=>ç
=>ã
=>º

Is there a command I can use to search and replace strings in the table across all the columns? Or maybe some even better fix?
12:20 pm on July 5, 2012 (gmt 0)

Administrator

WebmasterWorld Administrator coopster is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:July 31, 2003
posts:12533
votes: 0


If your rows have last update timestamps you could narrow down which rows have not been updated yet since the initial import and you could update just those rows.