title: How to choose returned column name in a SELECT FOR XML query?
body: <p>MS SQL has a convenient workaround for concatenating a column value from multiple rows into one value:</p>
  
  <pre><code>SELECT col1
   FROM table1
   WHERE col2 = 'x'
   ORDER by col3
   FOR XML path('')
  </code></pre>
  
  <p>and that returns a nice recordset:</p>
  
  <pre><code>XML_F52E2B61-18A1-11d1-B105-00805F49916B                                     
  ---------------------------------------- 
  &lt;col1&gt;Foo&lt;/col1&gt;&lt;col1&gt;Bar&lt;/col1&gt;
  </code></pre>
  
  <p>only the column name in the returned recordset is rather nasty!</p>
  
  <p>The column name seems to include random elements (or a GUID), and hence I am reluctant to use it in my application (different instances or different servers might have another GUID).  Unfortunately I cannot use * to select the value, and due to the restrictions in the existing application I cannot iterate through returned columns, either...</p>
  
  <p>Is there a way to force the column name in the returned recordset to something more sensible?</p>