Order values in text column as numbers

D

Darren La Padula

Hey there:

I have a text field. The user may enter a number into the field. When they
output records from the table, they have the ability to choose on what column
the output should be ordered. If that particular column is filled with
numeric values, is there a way I can order those values as numbers as opposed
to text?

i.e. order by number you get 1,2,3,4,5,6,7,8, 9,10,11
if you order the same values as text, you get 1, 10, 100, 2, 3, 4, 5, 6, 7,
8, 9

Thanks for any insight.
 
R

Rick Brandt

Darren said:
Hey there:

I have a text field. The user may enter a number into the field. When
they output records from the table, they have the ability to choose
on what column the output should be ordered. If that particular
column is filled with numeric values, is there a way I can order
those values as numbers as opposed to text?

i.e. order by number you get 1,2,3,4,5,6,7,8, 9,10,11
if you order the same values as text, you get 1, 10, 100, 2, 3, 4, 5,
6, 7, 8, 9

Thanks for any insight.

Add Val(FieldName) as a calculated field and sort on that.
 
Top