Subject Re: [ib-support] Re: ORDER BY as number when not
Author Ann Harrison
At 05:12 PM 6/1/2003 +0200, Paul Vinkenoog wrote:
> >
> > 1
> > 11
> > 20
> > A
> > AA
> > BA
> >
> > ??
> >
> > What kind of order is this? This is a very custom order...
>
>I think "the right order" is what the user/programmer needs at a
>certain point in the application, so it varies from case to case.

You might want to look at some of the information at ibphoenix.com
or http://www.brookstonesystems.com/ on collations. Essentially a
collation is a mapping from the user representation of data to a
representation that sorts naturally. In your case, all that would
be necessary, I think, is to pad all numeric values with leading
zeros out to a common length. Any key with a leading number (29B)
would count as numeric.

Regards,


Ann