title: SQL Multiple Rows to one CSV
body: <p>I'm having issues converting concatenating multiple rows to one row with CSV </p>
  
  <p>This is what I have</p>
  
  <pre><code>   [Project Number] | [Resources]
  1   25254              , Jim Anderson
  2   25254              , Becky Smith
  3   32564              , Amy Dickerson
  4   32564              , James Walsh
  5   25679              , Jim Anderson
  6   25679              , James Walsh
  </code></pre>
  
  <p>This is what I need</p>
  
  <pre><code>   [Project Number] | [Resources]
  1   25254              Jim Anderson, Becky Smith
  2   32564              Amy Dickerson, James Walsh
  3   25679              Jim Anderson, James Walsh
  </code></pre>
  
  <p>This is the query I'm using</p>
  
  <pre><code>select *
  from(
          select
              'Project Number' = p.ProjectID
          ,   'Resources' = ', ' + pe.Name
          from
              Projects p (nolock)
          left join Persons pe (nolock) on p.PersonsID = pe.PersonsID
          where
              year( p.CreatedDTM) = 2013
              and p.TypeID = 1
      ) ta
  order by ta.APAID
  </code></pre>
  
  <p>Please help.</p>
  
  <p>Thank you.</p>