How do I replace multiple strings from one column in MySQL?

35 Views Asked by At

I am working on a multiple language database. Unfortunately, some of strings was mistakenly inputted into the wrong language column.

I have a glossary for those strings, but the replacement task is huge (over 3,000). I cannot finish the work with the Query I used before.

*UPDATE
    tableName
SET
    column = REPLACE(column,'BereplaceString','replaceString')
 WHERE
    locale = "XX" and 
    description like “%BereplaceString%"

It is possible to make the replacement task into one command? (I can use excel to combine for the replace string, but don't want to execute the command for a 1000 times)

Thanks for helping in advance!

Now:

ID     Column A         Column B
      (Langauge)     (Description)    
 
1         EN           red pomme  
2         FR           apple rouge
3         EN        yellow citron    
4         FR           lemon jaune

Expected Outcome:

ID     Column A         Column B
      (Langauge)     (Description)    
 
1         EN           red apple
2         FR           pomme  rouge
3         EN        jaune citron    
4         FR           lemon yellow
0

There are 0 best solutions below