You could try:

SELECT memberid, lastname
  FROM tblmembers
  ORDER BY lastname COLLATE latin1_german2_ci ASC

It worked in my database. But I dont know, if my database is utf8.

By the way: Perhaps you could tell me how I can determine/change the encoding 
of the database?

Kind regards
Christian Wollmann

Am Freitag, 22. Juli 2005 10:06 schrieb Nico Grubert:
> Hi there,
>
> I have a MySQL 4.1 DB running including a database whose character set
> is set to utf8.
> In the database I have a table "tblmembers" with some records containing
> german umlauts.
> How do I sort results with german umlauts if the database character set
> is set to utf8?
>
> Using the SQL query
>
> SELECT memberid, lastname
>   FROM tblmembers
>   ORDER BY lastname
>
> I get the following result:
>
> Makee
> Maty
> Mayer
> März
> Müller
> Münze
> Mebel
> Meier
>
> This sort order is wrong according to german sorting rules.
>
> The right sorting order according to german sorting rules is:
>
> Makee
> März
> Maty
> Mayer
> Mebel
> Meier
> Müller
> Münze
>
>
> How can I sort the results in my utf8 database according german sorting
> rules?
>
> Thanks in advance.
>
> Kind regards,
> Nico
> _________________________________________________________________________
> Mit der Gruppen-SMS von WEB.DE FreeMail können Sie eine SMS an alle
> Freunde gleichzeitig schicken: http://freemail.web.de/features/?mc=021179

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to