title: converting rows into columns in t-sql - sql server 2005
body: <p>I have situation that I have a table in the structure</p>
  
  <pre><code>ID, name
   1, 'value1'
   1, 'value2'
   2, 'value3'
   2, 'value4'
   1, 'value5'
  </code></pre>
  
  <p>I wanted to show the above data in following format</p>
  
  <pre><code>id , combineName
  1  ,'value1','value2', 'value5'
  2  ,'value3','value4'
  </code></pre>
  
  <p>Is there an easy way to do this in SQL Server 2005, or will I have to run cursors to do it?</p>