How to remove diacritics in SQL Server
The easiest way to remove diacritics from a string in SQL Server is to collate the string using a character set that does not include diacritics, such as :
SELECT 'àéêöhello!' Collate SQL_Latin1_General_CP1253_CI_AI
This will output :
aeeohello!
This work only if you are not using a unicode string, so cast it as varchar first if you have a unicode string.
Written by Dominic Goulet
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Sql
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#