I have strings (called Alleles) in a table (called Antigens) that I'm having trouble sorting into the correct order.
A representative sample set of Alleles maybe:-
- 01:01
- 01:02
- 02:01
- 04:01
- 09:01N
- 10:01
- 104:01
- 105:01
- 11:01N
- 03:01:01
- 03:01:02
I need these Alleles to be in the following order:-
- 01:01
- 01:02
- 02:01
- 03:01:01
- 03:01:02
- 04:01
- 09:01N
- 10:01
- 11:01N
- 104:01
- 105:01
I can't sort the Alleles as strings because 104:01 & 105:01 will appear before 11:01.
I can't strip out the ':' characters and sort numerically as that will put 03:01:01 & 03:01:02 at the end as the numeric values would be 30101 & 30102 respectively.
I'm stumped as to how this can be achieved and would be grateful of any suggestions.
Cheers