>Hi All,
>I have a list of numbers. They are not numeric, just character. When I gather them in an SQL-select statement, they go in that funny order, i.e. 4017 will come right after 40169, etc. How would I the vales in there proper order? Don't say order by because that is what I am doing now.
>Thanks,
As long as the numbers are characters, you will always have this problem (unless they are propery alligned).
Just convert them to numeric, and then use ORDER BY. Example:
select *, val(cNumber) + 000000 as nNumber;
from MyTable;
order by nNumber
HTH,
Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)