Tuesday 31 October 2017

How to search in sql for arabic names

When you create table contains name and you want to search about 'إبراهيم', or 'أحمد', no result will return,
to overcome this problem create another field and update it by no Hamza as the following, search in the new field and the original field

update StudentInfo
  set FullNameWithoutHamza= REPLACE(REPLACE(FullName,N'إ',N'ا'),N'أ',N'ا')


In select
where FullName like N'%'+@StudentName+'%' or FullNameWithoutHamza like N'%'+@StudentName+'%'

Wednesday 25 October 2017

asp connect to sql and access