title: Rearrange string in SQL
body: <p>So I have a reference field in my database with contains data like this:</p>
  
  <pre><code> R8, R9, R1, R2, R3, R4, R5, R6, R7
  </code></pre>
  
  <p>I would like to rearrange this field to look like this:</p>
  
  <pre><code>R1, R2, R3, R4, R5, R6, R7, R8, R9
  </code></pre>
  
  <p>Furthermore, there is also some other types of descriptions, like this:</p>
  
  <pre><code>C7 (OP1 to OP12), C10 (OP1 to OP12), C3 (IP1 to IP16), C6 (OP1 to OP12), C10, C11, C12, C45, C49, C50, C14 (OP1 to OP12), C5 (OP1 to OP12), C9 (OP1 to OP12), C15 (OP1 to OP12), C51, C52, C54, C55
  </code></pre>
  
  <p>Which should be rearranged to look like this:</p>
  
  <pre><code>C3 (IP1 to IP16), C5 (OP1 to OP12), C6 (OP1 to OP12), C7 (OP1 to OP12), C9 (OP1 to OP12), C10, C11, C12, C14 (OP1 to OP12), and so on...
  </code></pre>
  
  <p>Is there any way to sort it with a SQL command?</p>