Subject Re: order-by problem
Author Adam
--- In firebird-support@yahoogroups.com, "martinknappe" <martin@...>
wrote:
>
> See the logic I was following was this: Remember the code of the sp?
> It went:
>
> for select first 20 id, asterm from
> dicentries
> where asterm = :astermin and id <= :idin
> order by asterm descending, id descending
> into idout, astermout
>
> The 20 records are fetched from back to front (order by asterm
> DESCENDING, id DESCENDING).

That is not true.

They are ordered by their ordinal value in descending order.

z - a then Z to A

You seem to be expecting a case insensitive sort, which you will not
get unless you define such a collation or use the upper.

Adam