Subject Re: [ib-support] ORDER BY as number when not
Author Paul Vinkenoog
Hello Todd,

> We have a table that has a number of different kinds of codes in it.
> Some are numbers and some are not, so the code itself is defined as
> a CHAR.
>
> Is it possible to order the data numerically in a select statement
> even when it isn't so the data comes out like:
>
> 1
> 2
> 3
> 11
>
> instead of
>
> 1
> 11
> 2
> 3

Have you tried it with a CAST? (Don't know if it works, never tried
using a CAST within an ORDER BY myself.)

Greetings,
Paul Vinkenoog