In
SQL Server one may face the issue of unable to insert or update Unicode
characters in column of NVARCHAR type.
Reason: By default when
you insert into NVARCHAR column, SQL Server try to save data as simple string.
Solution: Use 'N' as prefix
with NVARCHAR, The N' prefix indicates NCHAR or NVARCHAR data. It tells SQL
Server to convert a string into NCHAR.
Example:
DECLARE @TestVar NVARCHAR(20)
SET @TestVar = N'≤ 2'
SELECT @TestVar
|
Comments
Post a Comment