title: Couple columns from result into one separated with comma
body: <p>I got this query</p>
  
  <pre><code>declare var1 nvarchar(100)
      set @var1='84,85,86'
      SET @sql = N'select a1 from DamDocumentType1 where documentid in (' + @var1 + ')' ;
      EXEC (@SQL);
  </code></pre>
  
  <p>The result i get comes in one column and 4 rows. For example:</p>
  
  <p>3/2014</p>
  
  <p>4/2014</p>
  
  <p>5/2014</p>
  
  <p>8/2014</p>
  
  <p>How can i put this couple of rows in one row and one column and separate them with comma.For example:</p>
  
  <p>3/2014,4/2014,5/2014,8/2014</p>
  
  <p>I use that query for something so now i need it fixed to do this thing i just explained, i cant figure it out. You can say that I'm new in this :)</p>