I need to update a few site names that contain circumflex accents.
update site
set SITE_NAME = 'Gŵyr'
from site
where SITE_ID = '2112685'
However, the site name gets updated as Gwyr, without the accent. The column data type is nvarchar(256). I know that ^ is a UNICODE character, so is there an easy fix to put this character in the update query so it gets changed accordingly in the SITE_NAME column.
Add N before string literal to indicate that it is unicode:
Prefix Unicode character string constants with the letter N. Without the N prefix, the string is converted to the default code page of the database. This default code page may not recognize certain characters.
update site
set SITE_NAME = N'Gŵyr'
where SITE_ID = '2112685';
LiveDemo
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With