Reputation: 8274
I would like to perform an SQLite query and order my results with numbers last.
Eg:
SQLite will ordinarily order results like this when I specify ASC on a text field:
0, 1, 2, A, B, C
Whereas I would like this:
A, B, C, 0, 1, 2
Any ideas? Is this possible?
Thanks!
Nick.
Upvotes: 3
Views: 1467
Reputation: 22925
I know nothing about sqllite, but something like this should work (assuming, of course, that there is some sort of isnumeric
function available):-
order by isnumeric(colA), colA
so that your non-numerics appear first.
Upvotes: 3