Link to home
Start Free TrialLog in
Avatar of Sue_W
Sue_W

asked on

How can I insert a unicode character through stored procedue variable?

I have a table with an nvarchar(4000) column and i need to store speech phonemes which are unicode characters in the table through a stored procedure. I know I need to place and N' before the string being passed in. My stored procedure parameter is also set to be a varchar(8000) data type and this cannot be changed.

I have tried: set @Value ='N' + cast(@value as nvarchar(4000))  and set @Value ='N'''+ cast(@value as nvarchar(4000))  + ''''
where @value is '/Q/, /ð/'

The problem is the table shows me  N'/?/, /ð/' or N/?/, /ð/ which is not the correct characters and i do not want to store 'N' in my text column.

What am I doing wrong?

Thanks
ASKER CERTIFIED SOLUTION
Avatar of Philipal
Philipal
Flag of Israel image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial