开发者

sql: compare 2 strings without considering accents and other stuff îăţş = iats (<-should be equal)

I need to compare 2 strings in sql so that the word开发者_运维问答

"iast" would be equal to "îăşţ"

anybody knows how to do this ?


Just use an accent-insensitive collation for your comparisons:

IF 'iast'='îăşţ' COLLATE Latin1_General_CI_AI
PRINT 'YES'

For more info go through this link


  select 1 from Table_1
  where 'iast' = 'îăşţ' COLLATE Latin1_General_CI_AI
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜