How can I get numbers to ascend and descend in order properly?

K

kyle19

Right now, when I tell it to sort ascending, it orders them by the first
digit, not by the entire value, (ie 12, 19, 29, 7, 9) where it shoud be (7,
9, 12, 19, 29).
 
M

Mark M

If you don't want to change the data type for the field, you could write a
query with a field that converts the "text number" into a "number number"
and sort on that field. Try something like:

SELECT CLng([Field1]) AS TheNumber
FROM Table1
ORDER BY CLng([Field1]);
 
Top