|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Yesterday @ 9:52 AM
Points: 1,356,
Visits: 4,761
|
|
philip.cullingworth (12/3/2012) For interest, I thought I'd have a bit more of a look at which options displayed this effect, what caused Æ and æ to be returned.
It appears on our server (SQL 2005) that it is having a and e together in the like statement that causes this.
Changing the first like returned the following results (keeping the collation as in the question): [ae] returns Æ and æ [eaiou] returns nothing [uioea] returns Œ(140) and œ(156)
It appears that SQL is doing more than checking for just the characters entered.
Philip
It's obvious now I've read that!
Thanks for the explanation, and thanks to Tom for the question
|
|
|
|
|
SSCommitted
      
Group: General Forum Members
Last Login: Wednesday, May 15, 2013 9:15 AM
Points: 1,564,
Visits: 768
|
|
I got it wrong, but have been playing with the query. If I switch from char(1) values to nchar(1) and search 65535 values, it spits out six values: Æ 198 æ 230 Ǣ 482 ǣ 483 Ǽ 508 ǽ 509 --- I don't see any other accented versions of Œ 338, and œ 339.
Excellent. And there are double letters for dz (two different forms), lj, nj too.
Fascinating.
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Monday, May 06, 2013 8:39 AM
Points: 1,045,
Visits: 218
|
|
Not a lucky guess, but a good question none the less. After reviewing the answer and explanation, I learned something, probably nothing I can use today, but who knows where the future lies. Thanks, Lon
|
|
|
|
|
SSChampion
        
Group: General Forum Members
Last Login: Wednesday, May 08, 2013 10:33 AM
Points: 10,989,
Visits: 10,529
|
|
|
|
|
|
Say Hey Kid
      
Group: General Forum Members
Last Login: Monday, April 08, 2013 8:13 AM
Points: 688,
Visits: 100
|
|
(0 row(s) affected)
SQL2008 (64-bit) SP2
|
|
|
|
|
SSChampion
        
Group: General Forum Members
Last Login: Wednesday, May 08, 2013 10:33 AM
Points: 10,989,
Visits: 10,529
|
|
Jaroslav Pfauser (12/3/2012) (0 row(s) affected) SQL2008 (64-bit) SP2 It seems you wrote a test script that did not cover the full range of possibilities. Include CHAR(198) and CHAR(230) in your test. (2 row(s) affected)
Paul White SQL Server MVP SQLblog.com @SQL_Kiwi
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: 2 days ago @ 4:40 AM
Points: 1,078,
Visits: 847
|
|
SQL Kiwi (12/3/2012)
Jaroslav Pfauser (12/3/2012) (0 row(s) affected) SQL2008 (64-bit) SP2It seems you wrote a test script that did not cover the full range of possibilities. Include CHAR(198) and CHAR(230) in your test. (2 row(s) affected) Doesn't the test sql provided in answer already do that? On my server it returns 0 rows, so it appears like some other things affect this. Maybe default collation. Probably.
|
|
|
|
|
SSCommitted
      
Group: General Forum Members
Last Login: Wednesday, May 15, 2013 9:15 AM
Points: 1,564,
Visits: 768
|
|
On my server it returns 0 rows, so it appears like some other things affect this. Maybe default collation. Probably.
I'd suspect a different set of Extended ASCII characters, probably not the default collation on the server. For the folks who are getting no records back, what language is the machine running?
[appending] Yeah, it looks like several of the ASCII character sets don't include those AE/ae characters. http://en.wikipedia.org/wiki/ISO/IEC_8859
|
|
|
|
|
SSCommitted
      
Group: General Forum Members
Last Login: Yesterday @ 10:57 AM
Points: 1,632,
Visits: 10,850
|
|
Great question...but a challenge for a Monday morning!
Rob Schripsema Accelitec, Inc
|
|
|
|
|
SSC Eights!
      
Group: General Forum Members
Last Login: Yesterday @ 9:30 AM
Points: 830,
Visits: 1,197
|
|
| Very interesting question... definitely not something I would have realized otherwise.
|
|
|
|