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+'%'
No comments:
Post a Comment