The text you want to compare seems to be Khmer, not Arabic, so you should use a Khmer_100_*
collation.
(您要比较的文字似乎是高棉语,而不是阿拉伯语,因此您应该使用Khmer_100_*
归类。)
Have a look at this TSQL snippet
(看看这个TSQL片段)
declare @coll table (
name nvarchar(50),
khmerSupported bit
)
declare @text nvarchar(200) = N'??????????????? ??????? ???????????????????? ?????????????????? ???????????'
declare @name nvarchar(50), @sql nvarchar(500)
declare c cursor for
select name from sys.fn_helpcollations()
where name like 'khm%'
open c
fetch c into @name
while @@fetch_status = 0 begin
set @sql = 'select ''' + @name + ''', case when @text = N'''' COLLATE ' + @name + ' then 0 else 1 end'
print @sql
insert into @coll (name, khmerSupported)
exec sp_executesql @sql, N'@text NVARCHAR(200)', @text=@text
fetch c into @name
end
close c
deallocate c
select Name, KhmerSupported from @coll
and experiment with the collations query.
(并尝试使用归类查询。)
Use select Name, KhmerSupported from @coll where KhmerSupported=1
to find all collations supporting Khmer comparison.
(使用select Name, KhmerSupported from @coll where KhmerSupported=1
查找所有支持高棉语比较的排序规则。)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…