title: Split values over multiple rows
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/5493510/turning-a-comma-separated-string-into-individual-rows">Turning a Comma Separated string into individual rows</a>  </p>
  </blockquote>
  
  
  
  <p>I have the following output from a stored procedure and was wondering the best way to split the values into multiple rows.</p>
  
  <pre><code>reference   name                            subjects       subjectstitle
  LL9X81MT    Making and Decorating Pottery   F06,F27,F38       NULL
  </code></pre>
  
  <p>I need to trim the subjects field at the comma's and duplicate the information over three rows so the data would be as follows.</p>
  
  <pre><code>reference   name                            subjects       subjectstitle
  LL9X81MT    Making and Decorating Pottery   F06       NULL
  LL9X81MT    Making and Decorating Pottery   F27       NULL
  LL9X81MT    Making and Decorating Pottery   F38       NULL
  </code></pre>
  
  <p>I'm using MS SQL Server 2008 to setup these SP's and just need some help on how to split the subjects field up.</p>
  
  <p>Thanks,</p>