I have the following sample data for a particular column symbol for sample table.
(Update:) The data is not in a regular pattern. Number may occur at any place in between characters.
symbol
COL4A1
COL4A3
COL8A2
COL2A1
COL12A1
COL12A1
COL16A1
COL19A1
I need to sort the this data on database level. I used the following query:
select symbol from sample order by symbol asc
Result is follows:
COL12A1
COL12A1
COL16A1
COL19A1
COL2A1
COL4A1
COL4A3
COL8A2
But I need to get the order in the following way:
COL2A1
COL4A1
COL4A3
COL8A2
COL12A1
COL12A1
COL16A1
COL19A1