Is there any way to perform an update for normalizing a field using a single query?
Example:
UPDATE person SET name = REPLACE(name, 'á', 'a');
UPDATE person SET name = REPLACE(name, 'é', 'e');
UPDATE person SET name = REPLACE(name, 'í', 'i');
UPDATE person SET name = REPLACE(name, 'ó', 'o');
UPDATE person SET name = REPLACE(name, 'ú', 'u');
You can chain the replace calls, so it can be done in a single query:
But this quickly becomes an unmaintainable mess. If you’re simply trying to replace accented characters with their unaccented equivalents, maybe a character set change would be of more use.