Re: numeric sort on character field
Posted in 1999
Sujit.Pal@bankofamerica.com — — source: Informix-list mailing list archive (1991-1998)
Kevin Assuming the char field contains numeric data, you can "cast" the char data to numeric by adding a 0 to it and then ordering by this new column. Frex: select 0+mycolchar mynumchar, othercol1, othercol2 from mytable order by 1 HTH Sujit Kevin_Burdish@timeinc.com on 10/08/99 08:06:19 AM To: informix-list@iiug.org cc: (bcc: Sujit Pal) Subject: numeric sort on character field greetings and salutaions! This question came up the other day and I couldn't find an answer (other than a sort -n) How do I get a character field to sort numerically? Thanks, Kevin