I have a column of XML data that contains thousands of records/cells. Each cell within this column takes this form (below is what one cell looks like - suppose it is Cell 3):
<Document>
<Version>1</Version>
<Section Name="General">
<Value Name="Transaction type">CCM</Value>
<Value Name="Description">Benjamin Capital</Value>
<Value Name="Our likely role">Lead manager</Value>
<Value Name="Target description">structure (Dec</Value>
<Value Name="Previously submitted by email">No</Value>
</Section>
<Table Name="Team Members">
<Headers>
<Field Width="30">Name</Field>
<Field Width="18">Country</Field>
<Field Width="25">Department</Field>
<Field Width="25">Role</Field>
</Headers>
<Row>
<Field>Lincoln</Field>
<Field>Australia</Field>
<Field>Sales</Field>
<Field>Manager</Field>
</Row>
<Row>
<Field>Andrew</Field>
<Field>Vietnam</Field>
<Field>Estate</Field>
<Field>Director</Field>
</Row>
</Table>
<Table Name="Companies">
<Headers>
<Field Width="50">Party Name</Field>
<Field Width="25">Role</Field>
<Field Width="23">Contact Required?</Field>
</Headers>
<Row>
<Field>A2 Milk</Field>
<Field>Client</Field>
<Field>Yes</Field>
</Row>
<Row>
<Field>Citi Bank</Field>
<Field>Client</Field>
<Field>No</Field>
</Row>
<Row>
<Field>McKinsey Co</Field>
<Field>Provider</Field>
<Field>No</Field>
</Row>
</Table>
</Document>
As you could see there are two tables embedded within one cell, Team Members and Companies. Ideally, I wish to turn these two big tables to this format, using maybe two separate queries:
Team Members Table
Cell No | Name | Country | Department | Role
Cell 3 | Lincoln | Australia | Sales | Manager
Cell 3 | Andrew | Vietnam | Estate | Director
Cell 4 | .... | .... | ... | ...
Cell 4 | .... | .... | ... | ...
Companies Table
Cell No | Party Name | Role | Contact_Required
Cell 3 | A2 Milk | Client | Yes
Cell 3 | Citi Bank | Client | Yes
Cell 3 | McKinsey Co | Provider | No
Cell 4 | .... | .... | ...
Cell 4 | .... | .... | ...
Cell 5 | .... | .... | ...
The number of members and companies for each cell can be different. Please could you help me with this.