Grouping by initial letter
Posted by: Glenn Nilsson
Date: August 15, 2007 05:40AM

Hi,

I have a database/table utf8_unicode_ci. The contents is in german, but I will have several installations of the app with different collations (french, russian as a start). In german the letter å, ä, ö and ü exists but are treated by the collation as a, a, o and u respectively, they're just a "normal" letter with a twist. This is all fine and dandy.

Österreich, Oman, Schweden, Ägypten, Argentinien
becomes:
Ägypten, Argentinien, Oman, Österreich, Schweden

Here the problem; I want in my front end group the data by initial letters, and a DISTINCT(LEFT(name, 1)) should give me good data, but in the special case above, I get "Ä", "O", "S" and not "A", "O", "S".

So, is there any way the fetch the data from a collation point of view, and not data point of view?

And since I want this general for many collation I can't (easily) handle this in the code in my app.

Thanks
/Glenn

PS: I'm using MySQL v5.0.45.



Edited 1 time(s). Last edit at 08/15/2007 05:41AM by Glenn Nilsson.

Options: ReplyQuote


Subject
Views
Written By
Posted
Grouping by initial letter
3139
August 15, 2007 05:40AM
1973
August 15, 2007 07:02AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.