Concatenation between two columns in SQL query with Urdu text not working?
1 answer
Although you declared @string
as nvarchar
, you are not setting the value to a unicode string . So it creates it as an ascii value which will mess it up and then stores the result of that in a Unicode variable.
Also specify the size variable, otherwise it will be 1 character.
This should work (notice N
before the line):
declare @string nvarchar(50)
set @string = N'والد';
SELECT sCustomerNameUrdu + N' ' + @string + N' ' + sFatherNameUrdu from Customer
+3
source to share