Subject Re: [firebird-support] case sensitive "order by"
Author Helen Borrie
At 04:07 PM 11/04/2005 +0700, you wrote:

>Hello everybody,
>
> I've found that select statements like:
>
> select id, name
>
> from Human
>
> order by name;
>
> are case sensitive and the only way for case insensitive "order by" which
>I've found is select statement like:
>
> select id, name, upper(name)
>
> from Human
>
> order by 3;
>
>But this solution doesn't suit me. Is the any other solution?

A well-performing solution for case-insensitive orderings and searches is
to include a proxy column for each column you want this feature for, and
populate it with an insert and an update trigger, e.g.

create trigger pop_proxy for Human
active before insert or update as
begin
new.proxy_name = upper(new.name);
end

Index the proxy column.

./hb