Is there a way to do a numeric sorting when the number exists in a string. To be clear more, take an example:
Radius 1200
Radius 1500
Radius 1800
Radius 300
Radius 600
Radius 900
Being that character wise 1 is before 3, it is wondering if there's a way through the database to achieve the above record in ascending order as below:
Radius 300
Radius 600
Radius 900
Radius 1200
Radius 1500
This can be possible. Example your table is test, and the column is test_col. Use the following, and if the number is always at the end and always has a space in front of it this will work:
SELECT test_col, SUBSTRING_INDEX(test_col, '', 1) as test_col_str,
SUBSTRING_INDEX(test_col, ' ', -1) + 0 as test_col_num
FROM test ORDERBY test_col_str, test_col_num;