|
-
Mar 31st, 2010, 08:20 PM
#1
Thread Starter
Hyperactive Member
SQL - Sorting with Alpha - numeric character
Hi All Experts,
How to sort the field which contains alphanumeric character.
Suppose my the field data as below.
1,10,1a,2a,200a,a20,3,5
I want my output is 1,1a,10,2a,200a,3,5,a20
Is that possible to achieve?
Thanks in advance :-)
Where there is no hope, there can be no endeavor.
There are two ways of rising in the world, either by your own industry or by the folly of others.
-
Mar 31st, 2010, 08:45 PM
#2
Re: SQL - Sorting with Alpha - numeric character
It's possible, but you'd have to break the value into its alpha and numeric parts in your SQL code and then sort on both. If possible, a better option might be to store the alpha and numeric portions in separate columns. You can then simply sort on those two columns.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|