title: Returning multiple rows from querying XML column in SQL Server 2008
body: <p>I have a table <code>RDCAlerts</code> with the following data in a column of type <code>XML</code> called <code>AliasesValue</code>:</p>
  
  <pre><code>&lt;aliases&gt;
    &lt;alias&gt;
      &lt;aliasType&gt;AKA&lt;/aliasType&gt;
      &lt;aliasName&gt;Pramod Singh&lt;/aliasName&gt;
    &lt;/alias&gt;
    &lt;alias&gt;
      &lt;aliasType&gt;AKA&lt;/aliasType&gt;
      &lt;aliasName&gt;Bijoy Bora&lt;/aliasName&gt;
    &lt;/alias&gt;
  &lt;/aliases&gt;
  </code></pre>
  
  <p>I would like to create a query that returns two rows - one for each alias and I've tried the following query:</p>
  
  <pre><code>SELECT
     AliasesValue.query('data(/aliases/alias/aliasType)'),
     AliasesValue.query('data(/aliases/alias/aliasName)'),
  FROM [RdcAlerts]
  </code></pre>
  
  <p>but it returns just one row like this:</p>
  
  <pre><code>AKA AKA | Pramod Singh Bijoy Bora
  </code></pre>