title: concatenate values in SQL stored procedure
body: <p>I have a stored procedure on SQL Server 2008 that copies certain values from one table to another, I need to take 3 of the values and make them into one value in the second (copy to) Table.</p>
  
  <pre><code>INSERT INTO copyto (FIELD_ONE, FIELD_TWO, FIELD_THREE, 
              OTHER_DATA1, OTHER_DATA2, OTHER_DATA3, 
              )
  SELECT LTRIM(RTRIM(OTHER_DATA1)), LTRIM(RTRIM(OTHER_DATA2)),
         LTRIM(RTRIM(OTHER_DATA3)),LTRIM(RTRIM(FIELD_ONE)),
         LTRIM(RTRIM(FIELD_TWO)), LTRIM(RTRIM(FIELD_THREE))
         FROM copyfrom
  </code></pre>
  
  <p>Within the above example (which is code extracted from the stored procedure) I need to concatenate fields 1, 2 and 3.</p>