SQL Server 2012 未在结果中显示 unicode 字符 [英] SQL Server 2012 not showing unicode character in results
问题描述
我想要做的就是使用
是的,我在字符串前加上了 N''.那应该行得通吧?不.
截图:
注意 unicode 字符所在的小框.为什么?
根据对您问题的评论讨论,您的 SQL 代码是正确的并且正在更新 unicode 字符,但是 SQL Server Management Studio 无法(由于某种原因)显示GRID 结果集中的这个 unicode 字符.如果您将结果视图更改为 TEXT (control+T),您应该会看到 unicode 字符.
如果您使用 SSMS 进行查询,请将输出类型从网格"更改为文本",因为根据 字体,网格 无法显示 unicode."
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."
这篇关于SQL Server 2012 未在结果中显示 unicode 字符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!