Subject Re: [ib-support] order varchar as number
Author Helen Borrie
At 08:31 PM 5/02/2003 -0800, you wrote:
>I have a field cod : varchar(20). Posible value: '1',
>'2','aa','11','21', etc (numbers and strings).
>Order by cod : '1','11','2','21','aa'.
>I want an order like this: '1','2','11','21','aa' ?
>Who to do this?

Character columns are ordered by their ascii numbers. To enable
numerical-like ordering via Order By, you would need to write Before Insert
and Before Update triggers to left-pad the entries with blanks or zeros.