I have a column with values as below
18 ABC
45 XYZ
1 ABC
83 DEF
22 XYZ
4 ABC
I want them to be sorted as below while pulling the values from oracle DB
1 ABC
4 ABC
18 ABC
22 XYZ
45 XYZ
83 DEF
when I use order by substr(column,1) it is not giving the result as expected 4 ABC will go down after 22 XYZ
2and thus be sorted before4?