I have the following string
áéíóú
which I need to convert it to
aeiou
How can I achieve it? (I don't need to compare, I need the new string to save)
I have the following string
áéíóú
which I need to convert it to
aeiou
How can I achieve it? (I don't need to compare, I need the new string to save)
Use the translate function:
SELECT TRANSLATE(
N'INPUT: ïÜ×ÌùµŪč©īĐÃÙěÓńÿâŘåòÔÕłćýçÀŻūìóèůüíÄûØõäÕťżîŃà£êřßøŽÖáďÉęúÂĪāËžŮōÑÇĆź®Š¥ĘĒśŹĚŚšŸ¢ŁéąÈđÆÍÛĄÝĎēČÊŌŇöÏňëÎæãŤñÒÚĀÅÁô',
N'ÁÀÂÃÄÅàáâãäåĀāąĄæÆÇçćĆčČ¢©đĐďĎÈÉÊËèéêëěĚĒēęĘÌÍÎÏìíîïĪīłŁ£ÑñňŇńŃÒÓÔÕÕÖØòóôõöøŌōřŘ®ŠšśŚßťŤÙÚÛÜùúûüůŮŪūµ×¥ŸÿýÝŽžżŻźŹ',
N'aaaaaaaaaaaaaaaaaaccccccccddddeeeeeeeeeeeeeeiiiiiiiiiilllnnnnnooooooooooooooooorrsssssttuuuuuuuuuuuuuxyyyyyzzzzzz');
-- OUTPUT: 'INPUT: iuxiuuuccidaueonyaraooolcycazuioeuuiauooaotzioaleosozoadeeuaiaezuoncczrsyeeszessycleaedaiuaydeceonoineiaatnouaaao'
Check this link to find more 'look-a-like' characters:
Sometimes, the string can have another COLLATION, so you still have accents in the result. In that case, you can use this line (based on this solution here):
SELECT convert(varchar, your_string) COLLATE SQL_Latin1_General_Cp1251_CS_AS;