Can SQLXML (including Bulk Load) achieve arbitrary structural transformation?

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
Hi,
I know SQLXML (and bulk load) can achieve a "one-to-one" style XML data import - it creates a table for every XML element, and each attribute or simple-content child element becomes a column of this table. But can this data import process achieve arbitrary
structural transformation?
The simplest transformation would be collapsing the <Company> element and its child element <Employee>, into the same "Employee" table. But there are more complicated scenarios. For example:
<pre class="prettyprint" style=" <Root>
<OrdersByCustomer>
<CustomerInfo>
<Customer>
<CustomerID>1234</CustomerID>
...
</Customer>
<Address>...</Address>
</CustomerInfo>
<Orders>
<Order>...</Order>
<Order>...</Order>
<Order>...</Order>
</Orders>
</ OrdersByCustomer>
</Root>[/code]
<br/>
I want all data inside <Order> to go into the "Orders" table, together with the "CustomerID". Can SQLXML achieve such arbitrary transformation?
<br/>

View the full article
 
Back
Top