title: Transform XML data into Tabular format in T-SQL
body: <p>I would like to know how I could transform XML hierarchical data into tabular format and join with other relational database tables in SQL Server 2005 T-SQL (XPath/XQuery).</p>
  
  <p>For instance,</p>
  
  <pre><code>&lt;Employees&gt;
    &lt;Employee ID="001" Name="David" /&gt;
    &lt;Employee ID="002" Name="Mike" /&gt;
    &lt;Employee ID="003" Name="Alex" /&gt;
    &lt;Employee ID="004" Name="Morris" /&gt;
  &lt;/Employees&gt;
  </code></pre>
  
  <p>To ..</p>
  
  <pre><code> ID       Name
    --------+--------
    001       David
    002       Mike
    003       Alex
    004       Morris
  </code></pre>
  
  <p>Thanks for your suggestion. :)</p>