All I want to do is update a field with the DIRECT CURRENT SYMBOL FORM TWO ⎓
character into my SQL Server 2012 database. Is that too much to ask? Apparently it is.
The answer to this question and this question is the same and did not work for me.
My update script
UPDATE Table
SET Value = N'SUPPLY 9-30Vdc 0.2W ⎓'
WHERE id = '1234'
Aaaaand the relevant table schema:
CREATE TABLE [dbo].[Table]
(
...
...
[Value] [nvarchar] (1000) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
...
...
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
Want more? Here's the results of sp_columns
:
Yes, I prefixed the string with N''. That should work, right? Nope.
Screenshot:
Notice the little box where the unicode character should be. Why, though?
Per the comment discussion on your question, your SQL code is correct and the unicode character is being updated, but SQL Server Management Studio cannot (for some reason) display this unicode character in the GRID resultset. If you change your result view to TEXT (control+T), you should see the unicode character.
"If you use SSMS for your queries, change to output type from "Grid" to "Text", because depending on the font the grid can't show unicode."
Thanks to @Aron, I was having next problem:
In SSMS, when I copy a text like Sighișoara
from a grid result (table A from database A) and paste in an insert query (table B from database B), the result of this insert was Sighi?oara
, with an interrogation character.
Steps that helped to me in SSMS:
Show settings for
the option Grid Results
and for this option, use an unicode font.nvarchar(X)
, not varchar(X)
.Be sure that, when you insert data, you have N character
before string, like this:
insert into table(a,b,c,d,e,f) values ('Rumania',N'Sighișoara',GETDATE(),0,0,'Test')
(For SSMS 17.9.1)
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