I have a problem in SQL with NVARCHAR type and Persian char 'ی' and 'ک', I have some records in a Table like:
+----- Name ------+
+----- علی ------+
When I want to select from this Table like:
select * from [Table] when Name like 'علی'
select * from [Table] when Name='علی'
select * from [Table] when Name like 'علي'
select * from [Table] when Name='علي'
It returns NULL! I found that when I use N before strings it is solved but I need to use N before parameter in SP and try this:
declare @name nvarchar(max)='علی'
select * from [Table] when Name like N''+@name
But unfortunately it is not working and I found when I assign 'علی' to the nvarchar, automatically 'ی' converted to 'ي'!!!
How can I fix that?