db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dan Scott" <deni...@gmail.com>
Subject Re: order by
Date Mon, 27 Feb 2006 23:52:31 GMT
Is there any chance that the value "Michael" was inserted with a
preceding space or some other hard-to-see character?

" Michael" comes before "Amy" in most collating sequences.

Dan

On 2/27/06, Thomas Vatter <thomas.vatter@network-inventory.de> wrote:
>
> I am too stupid to write an sql 'order by' clause. For 'select
> firstname, lastname ...' I have added 'order by lastname, firstname' and
> have created a composite index on lastname and firstname. I thought the
> result would be an ordering like
> Amy    Miller
> Bode    Miller
> Michael    Miller
> Daren    Ralphs
> Steven    Ralphs
>
> But what I get is
> Michael    Miller
> Amy    Miller
> Bode    Miller
> Daren    Ralphs
> Steven    Ralphs
>
> I. e. Micheal is ordered as if it was part of the lastname. I don't
> understand that. Can anybody help me out?
>
> tom
>
>

Mime
View raw message