Can ACE select a CHAR field and treat it as an INTEGER?
Posted in 1994
Eric Thompson — — source: Informix-list mailing list archive (1991-1998)
I have a situation in which I'd like to select a character field
from a table and sort it as though it were an integer. I know in advance
that all rows returned will have numeric values, even though the field
must remain a char field.
I thought something like this should work, but it doesn't:
select int(char_field)
from table
order by 1
One inelegant method of solving this that I think might work is:
select char_field
from table
order by char_field[1], char_field[2], ..., char_field[8]
But that stops working after the eighth digit.
Any help is appreciated. E-mail preferred.
thanks,
Eric Thompson eric@saperstein.com (NeXTmail ok)
Saperstein, Mayeda & Goldstein thompson@netcom.com