title: How do I expand comma separated values into separate rows using SQL Server 2005?
body: <p>I have a table that looks like this:</p>
  
  <pre><code>ProductId, Color
  "1", "red, blue, green"
  "2", null
  "3", "purple, green"
  </code></pre>
  
  <p>And I want to expand it to this:</p>
  
  <pre><code>ProductId, Color
  1, red
  1, blue
  1, green
  2, null
  3, purple
  3, green
  </code></pre>
  
  <p>Whats the easiest way to accomplish this?  Is it possible without a loop in a proc?</p>