Reputation: 6943
I have a really weird issue with Sql queries on unicode data. Here's what I've got:
When I run the following, I get the correct row + 36 other rows returned... when it should only be the one row:
SELECT TOP 1000 [ID]
,[MyChineseColumn]
,UNICODE([MyChineseColumn])
FROM [dbo].[MyTableName]
WHERE [MyChineseColumn]= N'㐅'
As you'd expect, the row with 㐅
is returned, but also the following: 〇
, 宁
, 㮸
and a bunch of others...
Anyone have any ideas what is going on here? This has really got me confused and I am not sure how to solve this one (tried "Googling" already)...
Thanks
Upvotes: 3
Views: 1728
Reputation: 60190
You may want to try and use a binary collation, these characters seem to be somehow matched as identical (possibly by ignoring case and/or accents, depending on the used collation).
Upvotes: 0
Reputation: 452947
Please check the column is using an appropriate Chinese collation as that will determine the semantics used in this type of comparison.
Upvotes: 1