0

I need to create a valid string ([a-z0-9]) from a MySQL (v5.6) field that contains other characters while doing an insert select query.

Now with lower characters this is quite easy: LOWER(ca.attr_de),

But how about the other characters? I have chars of type (ö,ä,ß,é...) in the field.

Is there a simple command in mysql like the LOWER one that will do the job?

merlin
  • 2,717
  • 3
  • 29
  • 59
  • What char do you want to change them to? If you want to just change them to their counterparts without the accents, check this post here (the answer you are looking for will basically be the same for `'ß'`) : https://stackoverflow.com/questions/2302813/normalizing-accented-characters-in-mysql-queries or this one https://stackoverflow.com/questions/4813620/how-to-remove-accents-in-mysql – Sirmyself Dec 18 '18 at 15:44
  • Thank you, but all those answers are over 8 years old and by end 2018 I was hoping to see a one command solution in MySQL for this task. All the solutions are not what I am looking for. I need to do a one time operation with insert select and for the new field only the a-z09 char are valid. The source can stay the same. – merlin Dec 18 '18 at 16:05
  • maybe you can check this one http://blog.sqlpositive.com/2010/03/using-convert-with-collate-to-strip-accents-from-unicode-strings/ it looks like it's SQL, but you maybe find some clues – Sirmyself Dec 18 '18 at 19:37

0 Answers0