title: Concatenating multiple rows fields into one column in T-SQL
body: <p>I am writing an SQL query in which that I will need to perform a sub select on a table, which will usually return multiple rows. I need to be able to join together the results of a certain field from all the rows into one field to output. Is this possible, and how?</p>
  
  <p>For example, if the SQL query returns</p>
  
  <pre><code>id | field
  1  | test1
  2  | test2
  3  | test3
  </code></pre>
  
  <p>I need the outputted field to be "test1 test2 test3".
  Thanks</p>