I have a requirement to search for people by name. Here, the names of people can be in English, Korean or Chinese. To do this, I used the Like condition to search based on Name , as shown below:
select * from [MyTable] where Name like N'%t%'
The above operator provides all users that contain the letter t . But this does not work with Korean or Chinese. For example, if I search with the Korean letter γ
, then it must provide all the names containing this letter, like **μ μμ°, μ¬νμμ΄ν, μ μν ν
μ€νΈ 7** . I tried the following methods, but it gave zero results
select * from [MyTable] where Name like N'%γ
%' - No Results select PATINDEX(N'%γ
%',N'μ μμ°(Mohan)') - giving value as ZERO select Charindex(N'γ
',N'μ μμ°') - giving value as ZERO
Is there a way to find the alphabets of other languages ββon a SQL server?
I know how to find the existence of an alphabet in another language in C # words using coding methods, but not on a SQL server. Please help me in this regard.
Thanks in advance.
EDIT for C # code
public static string DecomposeSyllabels(string unicodeString) { try { //Consonant consonant only used string[] JLT = { "γ±", "γ²", "γ΄", "γ·", "γΈ", "γΉ", "γ
", "γ
", "γ
", "γ
", "γ
", "γ
", "γ
", "γ
", "γ
", "γ
", "γ
", "γ
", "γ
" }; // Only used a collection of neutral string[] JVT = { "γ
", "γ
", "γ
", "γ
", "γ
", "γ
", "γ
", "γ
", "γ
", "γ
", "γ
", "γ
", "γ
", "γ
", "γ
", "γ
", "γ
", "γ
", "γ
‘", "γ
’", "γ
£" }; // Initial and coda consonants used in string[] JTT = { "", "γ±", "γ²", "γ³", "γ΄", "γ΅", "γΆ", "γ·", "γΉ", "γΊ", "γ»", "γΌ", "γ½", "γΎ", "γΏ", "γ
", "γ
", "γ
", "γ
", "γ
", "γ
", "γ
", "γ
", "γ
", "γ
", "γ
", "γ
", "γ
" }; double SBase = 0xAC00; long SCount = 11172; int TCount = 28; int NCount = 588; string syllables = string.Empty; foreach (char c in unicodeString) { double SIndex = (int)c - SBase; if (0 > SIndex || SIndex >= SCount) { syllables = syllables + c; continue; } int LIndex = (int)Math.Floor(SIndex / NCount); int VIndex = (int)(Math.Floor((SIndex % NCount) / TCount)); int TIndex = (int)(SIndex % TCount); syllables = syllables + (JLT[LIndex] + JVT[VIndex] + JTT[TIndex]); } return syllables; } catch { return unicodeString; } }