Re: IDS 9.2: ORDER BY UPPER(varchar)
Posted in 2000
Topics: Data Types & Schema Design, Versions, Editions & End-of-Life
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...
SELECT UPPER(foo), foo, bar, baz
FROM urk
ORDER BY 1
--
Forte International, P.O. Box 1412, Ridgecrest, CA 93556-1412
Ronald Cole <ronald@forte-intl.com> Phone: (760) 499-9142
President, CEO Fax: (760) 499-9152
My GPG fingerprint: C3AF 4BE9 BEA6 F1C2 B084 4A88 8851 E6C8 69E3 B00B
Ronald Cole <ronald@forte-intl.com> writes:
> 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...
>
> SELECT UPPER(foo), foo, bar, baz
> FROM urk
> ORDER BY 1
Of course, what I neglected to mention is that you will never be about
to use an index because what you want your query sorted by isn't a
component of the index (uppercase sorts before lowercase in US-ASCII).
--
Forte International, P.O. Box 1412, Ridgecrest, CA 93556-1412
Ronald Cole <ronald@forte-intl.com> Phone: (760) 499-9142
President, CEO Fax: (760) 499-9152
My GPG fingerprint: C3AF 4BE9 BEA6 F1C2 B084 4A88 8851 E6C8 69E3 B00B