sql server 2005 中的 Wingding 字符

发布于 2024-08-27 04:50:18 字数 280 浏览 5 评论 0原文

在 winforms 应用程序中,我将一个 Wingdings 字符存储在 NVARCHAR(1) 类型的 SQL Server 2005 字段中。

在控件中存储、检索和显示该字符效果很好。

我面临的问题是:如何搜索具有特定 wingding char 值的记录:例如

Select * from table where FieldWithWingding = valueOfLeftArrowChar

如何实现这一点?

提前致谢

In a winforms application i 'm storing one Wingdings char in a SQL Server 2005 field of type NVARCHAR(1).

Storing, retrieving and showing up this char in a control works fine.

The problem i'm facing is this: how to search for records which have a specific wingding char value: for example

Select * from table where FieldWithWingding = valueOfLeftArrowChar

How to achieve this?

Thanks in advance

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

烟若柳尘 2024-09-03 04:50:19

Wingdings 是一种字体!字体为给定字符集中的字符提供特殊的外观。因此,左箭头是一个字符。在开始->所有程序->附件->系统工具->字符映射表中查找

您的选择将类似于:

Select * from table where FieldWithWingding = 'ß'

Wingdings is a font! Fonts give a special appearance to characters in a given character set. The left-arrow is therefore a character. Look it up in start->all programs->Accessories->System tools->Character map

Your select will be something like:

Select * from table where FieldWithWingding = 'ß'
小霸王臭丫头 2024-09-03 04:50:19

伊戈尔为我指明了正确的方向:
它实际上是

Select * from table where FieldWithWingding = N'ß'

工作正常!

谢谢大家!

Igor pointed me into the correct direction:
it's actually

Select * from table where FieldWithWingding = N'ß'

Works fine!

Thank you everybody!

半枫 2024-09-03 04:50:19

试试这个:选择 Unicode(N'ß')、Nchar(Unicode(N'ß'))

使用 @filter nvarchar(1) 或 nchar(1) 数据类型

Try this: select Unicode(N'ß'), Nchar(Unicode(N'ß'))

Use @filter nvarchar(1) or nchar(1) data types

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文