T-SQL LIKE statements need help

I would like to search in DB

input line "oxoşil"

  • o → [o-ö]
  • x → [x-ks]
  • ş → [s-ş]
  • ş → [ş-sh]

I need to look for all these fights. Required search criteria: [o-ö] [x-ks] [o-ö] [ş-s-sh] [i-ı] l

is there any way to this with a t-sql-like statement? or in linq?

+3
source share
2 answers

I would try to force the sort to accent-insensitive. Of course, choose the one that suits you, not the Latin / General

WHERE
    myCol COLLATE LATIN1_GENERAL_CI_AI LIKE '%oxoşil%' COLLATE LATIN1_GENERAL_CI_AI
+3
source

One effective way to do this is to use the CLR stored procedure:

. : TSQL Regular Expression Workbench

0

Source: https://habr.com/ru/post/1768836/


All Articles