title: Splitting comma-separated string selecting as columns with joins in SQL Server?
body: <p>I have a table like this:</p>
  
  <pre><code>name     orderid
  bambino  4,5,6,7,8
  </code></pre>
  
  <p>How can we separate values in <code>orderid</code> column into different columns like in example below?</p>
  
  <pre><code>name     order1 order2 order3 order4 order5
  bambino  4      5      6      7      8
  </code></pre>