XML : SQL xml merge first row values with rest of the rows

I would like to know in SQL Server how do I take the following XML and represent the following table.

  <Family>    <Main Surname="Smith" />    <Person Name="Fred" />    <Person Name="Jane" />  </Family>    Row Name    Surname  1   Fred    Smith  2   Jane    Smith    

Please note I cannot change the XML schema.

No comments:

Post a Comment