May 26, 2010 at 12:10 pm
Very nice question today. I only found it easy because I have been doing stuff with unusual collations recently.
There's a great set of visual tables showing sort (and comparison) orders at:
http://www.collation-charts.org/mssql/
edit: used a code tag instead of url first time around :rolleyes:
May 26, 2010 at 12:20 pm
Tom Garth (5/26/2010)
The actual number of rows in #t with a default installation is 20449.
It depends 😀 I've got 3969 rows with my default installation.
May 26, 2010 at 12:25 pm
Tom Garth (5/26/2010)
Quite correct. The actual number of rows in #t with a default installation is 20449. To get the 26 by 26 result requireswhile ASCII(@a1) <= ASCII('Z') begin
, etc.This QotD turned out to be much more interesting than I initially thought it would.
Thanks for the lesson!
Yes, it was very interesting for me in the moment I dicovered the problem with 'CH'. Other interesting thoughts came to me when I wrote the question and the discussion is very useful.
May 26, 2010 at 12:27 pm
Paul White NZ (5/26/2010)
Very nice question today. I only found it easy because I have been doing stuff with unusual collations recently.There's a great set of visual tables showing sort (and comparison) orders at:
http://www.collation-charts.org/mssql/
edit: used a code tag instead of url first time around :rolleyes:
Thank you for URL. It's very good source. It explained me a lot about some strange things I met before.
May 27, 2010 at 12:41 am
First thought: How can values like 'AA' be found with LIKE '_' ?
Zero rows. Click. Zero points.
Next time I will wait for the caffeine to do its work. I learned something, hope I remember it when I need it. 😉
May 27, 2010 at 1:01 am
gserdijn (5/27/2010)
First thought: How can values like 'AA' be found with LIKE '_' ?Zero rows. Click. Zero points.
Next time I will wait for the caffeine to do its work. I learned something, hope I remember it when I need it. 😉
I was surprised too. I watched it after one of my coworkers came with a question: "How it is possible, this query returned this data?" His pattern was little bit more complicated, something like '__[_]_[_][[]%'.
And the best point: I could write a question with "It depends" option:-)
June 1, 2010 at 8:37 pm
I almost picked "It Depends" because, but I thought no, it couldn't be possible with a standard VARCHAR. Learned another thing today, at the cost of a point. 🙂
September 22, 2010 at 6:57 pm
A beautiful question, which may have made some of the backwoodsmen notice that there are collations other than the one which fits US ASCII perfectly and fits nothing else. But I'm not holding my breath while waiting for the average US (or should that be "U/S"?) DBA or DB designer to notice our weird "foreign" collation stuff.
Tom
September 23, 2010 at 12:12 am
Tom.Thomson (9/22/2010)
A beautiful question, which may have made some of the backwoodsmen notice that there are collations other than the one which fits US ASCII perfectly and fits nothing else. But I'm not holding my breath while waiting for the average US (or should that be "U/S"?) DBA or DB designer to notice our weird "foreign" collation stuff.
Thank you.
March 30, 2011 at 9:42 pm
Great question, thanks!
I lost a point here, but it was well worth it as I hadn't even considered collation when I answered.
June 11, 2014 at 5:07 pm
crussell-931424 (6/11/2014)
How did I miss this one?
Judging by your comment posted Tuesday, May 25, 2010 2:33 PM the answer to that question is pretty obvious, but in the interests of being polite I will omit supplying that answer.
Tom
Viewing 11 posts - 46 through 55 (of 55 total)
You must be logged in to reply to this topic. Login to reply