MySQL order by Alphanumeric (Numers, Capital letters and then lower case)

211 views Asked by At

How do i in MySQL sort by Numbers, Capital Letters and lastly lower case letters?

This is my current table:

24RpS8wYitPWHnAMp
25xa2RpBh28CjQcnk
27WkTQiFNuxbfXZgG
288vdizSY4G6yBdMT
28A2hedvGvGpBNwKu
28A2hedvGvGpBNwKu
2a5tTwyMBxmjety99
2a5tTwyMBxmjety99
2a5tTwyMBxmjety99
2a5tTwyMBxmjety99
2B7a4TGCGBYnQ8JJM
2B7a4TGCGBYnQ8JJM
2eWFRNrxKe4K472DJ
2FW2JJEoRjn6ddCkv

And i want it like this:

24RpS8wYitPWHnAMp
25xa2RpBh28CjQcnk
27WkTQiFNuxbfXZgG
288vdizSY4G6yBdMT
28A2hedvGvGpBNwKu
28A2hedvGvGpBNwKu
2B7a4TGCGBYnQ8JJM
2B7a4TGCGBYnQ8JJM
2FW2JJEoRjn6ddCkv
2a5tTwyMBxmjety99
2a5tTwyMBxmjety99
2a5tTwyMBxmjety99
2a5tTwyMBxmjety99
2eWFRNrxKe4K472DJ

i found this: http://www.essentialsql.com/use-sql-server-to-sort-alphanumeric-values/

but i can't use the PATINDEX function in MySQL..

0

There are 0 answers