Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Search for words with the letter ü in MS SQL

When I do a LIKE search in MS SQL I want to get all Günter's when I search for Gunter. I'm using the Finnish_Swedish collation and they treat them as different characters. Anyone have a tip?

like image 725
Kenneth Avatar asked Oct 28 '25 10:10

Kenneth


2 Answers

You can use the following query

SELECT * FROM mytable WHERE Column LIKE '%G[uü]nter%'

That will search for one of the 2 versions of u

like image 158
Szymon Avatar answered Oct 29 '25 23:10

Szymon


It seems you specified an accent sensitive collation for your server or database.
To do an accent insensitive select, you can explicitly specify a collation.
However, it seems you have chosen the wrong collation for your purpose.

like image 20
cdoubleplusgood Avatar answered Oct 30 '25 01:10

cdoubleplusgood



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!