Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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 ?

like image 239
Omu Avatar asked Dec 17 '22 23:12

Omu


1 Answers

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

like image 86
Bharat Avatar answered Dec 28 '22 05:12

Bharat