[Solved] How can I sort between characters and numbers in column [closed]


Here is another option

Example

Select Robot_Type
 from (Select distinct Robot_Type 
        From  YourTable
      ) A
 Order By try_convert(int,left(replace(Robot_Type,'IRB',''),patindex('%[a-z,/]%',replace(Robot_Type,'IRB','')+'a')-1))
      ,Robot_Type

Returns

Robot_Type
NULL
IRB 120
IRB140
IRB 360
IRB 910SC   ---<< Disconnect from your desired results
IRB 1200
IRB 1410
IRB 1520
IRB1600
IRB1600/1660
IRB1600ID
IRB1600ID/1660ID
IRB1660ID
IRB 2400
IRB 2600
IRB 4400
IRB 4600
IRB 6620
IRB 6640
IRB 6650
IRB 6660
IRB 6700
IRB 7600
IRB 8700
IRB 14000

0

solved How can I sort between characters and numbers in column [closed]