ORDER BY a Column with Numeric Values
Posted on 2006-11-06
I have a column that stores suite/apartment numbers. This is data that is imported to our local database, so I don't have control over validating the data. The data that the column holds sometimes is a number, text, or a combination of the two, such as "201", "12A", or "SUITE 220".
Is there any way to have this ordered numerically, when appropriate, such as:
1,2,3,11,24, instead of 1,11,2,24,3
12A, 22A, 111A instead of 111A, 12A, 22A
SUITE 10, SUITE 20, SUITE 110, instead of SUITE 10, SUITE 110, SUITE 20