I have a field with the following content in a record in my SQL Server database:
salsaaften
It means “salsa evening” in danish for those interested 🙂
When I do like this I am not able to find the record:
SELECT * FROM table_name WHERE field_name LIKE ‘%salsa%’
However, when I do this, I find the record perfectly fine:
SELECT * FROM table_name WHERE field_name LIKE ‘%sals%’
The same thing happens with “aften” and “ften”. No results when searched for “aften”, but a perfect match when searched for “ften”.
It looks like it’s the “aa” that are confusing the database.. But why? And how to fix?
Thanks in advance 🙂
The sequence “aa” in some collations is treated as a single character. You might want to check to make sure the collation is the one you want.