How to sort a text column in numerical order?
I have a text column in a table:
...
col2 text
...
which can contains values that are both number and a combination of numeric
and text:
1
1a
2
2a
2b
10
12
12a
etc.
Of course, they aren't entered into the table in any particular order.
A select like this:
select * from tablex order by col2;
returns this:
10
12
12a
1
1a
2a
2b
what we would like to get is:
1
1a
2
2a
2b
10
12
12a
Any ideas on how to achieve this?
Thanks,
--
Laurette Cisneros
The Database Group
(510) 420-3137
NextBus Information Systems, Inc.
www.nextbus.com
----------------------------------
"Intelligence complicates. Wisdom simplifies."
-- Mason Cooley