skip to Main Content

In Postqresql, I have this query:

select *  
from students 
where name like '%Huseyin%'

When I run it, I want to get data that has name is "Huseyin", "Hüseyin", "Huseyın", "Hüseyin".

How can I do this? I use Dapper. I did not create database with collation. I just want to use collation in select query (Turkish special characters is i,ü,ş,ö,ğ)

2

Answers


  1. Chosen as BEST ANSWER

    We solved this question like this;

    SELECT * FROM student WHERE unaccent(first_name) ilike unaccent('%caglar%')

    it brings data if caglar or çağlar exist in database. Before use "unaccent", it is necessary some setting in postgresql database.


  2. Add this query and try again.

    Select * From [TableName] Where [ColumnName] Like ‘%Ayşe%’ COLLATE SQL_Latin1_General_CP1_CI_AS

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search