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
精彩评论