Hello, While executing the below T-SQL code, it yields not results [the search word is a unicode text]. After exploring i realized that the Unicode concatenation is not working well. All the characters converting to question marks. declare @search_word nvarchar(255) declare @sql nvarchar(255) set @search_word='اب'; set @sql=N'select * from users where [fi_name] like ''%'+@search_word+'%'''; print @sql exec sp_executesql @sql Any clues how to overcome this?
The code works perfectly well, don't worry. The only problem is that the results are being shown in a font that does not support those characters. Just select a font that does.
Thanks for your reply. I was missing the charactor N before the uniocde string assignment which yielded results in ???. My assignement statement s changed as below to work this query in SQL Server Management Studio. set @search_word=N'اب';