Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
kussy
Starting Member
2 Posts |
Posted - 2009-02-03 : 05:26:32
|
| I've got a Table called CICD_CONTENTIn a ntext column called content_value one record has the cyrillic alphabet inside.(I Copy / pasted it from wikipedia site)I'v got no problems with insert, update and select (over id) this contents, butWhen i send the query SELECT * FROM CICD_CONTENT WHERE content_value LIKE N'%?%' ? means the AE (#1236) in this forum it can' be displayed...It returns me ALL Records of this table !!This problem seems occure if any unicode character in the search string is greater than #1228Other characters, like ? (#1149) worked fine.I don't know, what to do...Any ideas ??Thanks for help |
|
|
Arnold Fribble
Yak-finder General
1961 Posts |
Posted - 2009-02-03 : 09:10:33
|
| I agree that this seems very strange, since other character that LIKE isn't ignoring have exactly the same Unicode properties and were added in the same version of Unicode (1.1). Other than using a binary collation (e.g. Latin1_General_BIN2) it doesn't appear to make any difference what collation is used for the comparison. |
 |
|
|
kussy
Starting Member
2 Posts |
Posted - 2009-02-04 : 01:44:15
|
| Thanks alot ArnoldThis seems to be the solution for my problem.SELECT * FROM CICD_CONTENT WHERE content_value like N'%...%' Collate Latin1_General_BIN2Nice day |
 |
|
|
Arnold Fribble
Yak-finder General
1961 Posts |
Posted - 2009-02-04 : 16:26:48
|
| Just to follow up on this, I got around to checking on SQL Server 2008.The old collations have to stay the same so that existing indexes don't go wrong, but the new _100_ collations allow LIKE to correctly see NCHAR(1236) (and many others!) as something different from an empty string.So if you're using SQL Server 2008, collations like Latin1_General_100_CI_AS or Cyrillic_General_100_CI_AS should work fine. |
 |
|
|
|
|
|