Re: IDS 9.2: ORDER BY UPPER(varchar)
Posted in 2000
Thomas Parsli <thomas.parsli@startsiden.no> writes:
> Is it possible to sort by a function in IDS 9.2?
> (and use a index;)
>
> SELECT foo, bar, baz
> FROM urk
> ORDER BY UPPER(foo)>
> I've RTFM'd, but obviously not enough...
After more RTFMing:
Performance Guide IDS.2000 7-27:
When Is a Functional Index Used?
The optimizer considers whether to use a functional index to access the
results of functions that are in one of the following query clauses:
-SELECT clause
-Filters in the WHERE clause
(No ORDER BY) -Shite!
The problem is ansi-sorting (Zope comes before android), and I'd like
to sort those problems out with a functional index and a order by using UPPER.
(I know I can add a UPPERcased field to each record and use that in ORDER BY)
Thomas