Reputation: 21
I want following string to store in variable but It's giving error in SQL Server.
DECLARE @string nvarchar(max)
set @string=''˗ˏˋmichaelˎˊ˗''
Upvotes: 0
Views: 483
Reputation: 33581
The ' is a string delimiter in t-sql. If you want to include that character in your string you need to double them. You also need to specify that your string literal is nvarchar by preceding the string with N.
DECLARE @string nvarchar(max)
set @string= N'''˗ˏˋmichaelˎˊ˗'''
select @string
Upvotes: 3