C
CK
This query
SELECT DeliveryList.query('declare default element namespace
http://schemas.adventure-works.com/DeliverySchedule;
<DeliveryRoute>
<RouteNo>{ sql:column("D.DeliveryRoute") }</RouteNo>
for a$ in /DeliveryList/Delivery/Address
return
<Address>a$</Address>
</DeliveryRoute>')
as Result
FROM Sales.DeliverySchedule D
Returns this XML
<DeliveryRoute xmlns="http://schemas.adventure-works.com/DeliverySchedule">
<RouteNo>3</RouteNo>
for a$ in /DeliveryList/Delivery/Address
return
<Address>a$</Address></DeliveryRoute>
I need it to return this XML
<DeliveryRoute xmlns="http://schemas.adventure-works.com/DeliverySchedule>
<RouteNo<3>/RouteNo>
<Address>6126 North Sixth Street, Rockhampton</Address>
<Address>6445 Cashew Street, Rockhampton</Address>
</DeiveryRoute>
What am I doing wrong? Any ideas? All help is appreciated.
TIA, ~CK
SELECT DeliveryList.query('declare default element namespace
http://schemas.adventure-works.com/DeliverySchedule;
<DeliveryRoute>
<RouteNo>{ sql:column("D.DeliveryRoute") }</RouteNo>
for a$ in /DeliveryList/Delivery/Address
return
<Address>a$</Address>
</DeliveryRoute>')
as Result
FROM Sales.DeliverySchedule D
Returns this XML
<DeliveryRoute xmlns="http://schemas.adventure-works.com/DeliverySchedule">
<RouteNo>3</RouteNo>
for a$ in /DeliveryList/Delivery/Address
return
<Address>a$</Address></DeliveryRoute>
I need it to return this XML
<DeliveryRoute xmlns="http://schemas.adventure-works.com/DeliverySchedule>
<RouteNo<3>/RouteNo>
<Address>6126 North Sixth Street, Rockhampton</Address>
<Address>6445 Cashew Street, Rockhampton</Address>
</DeiveryRoute>
What am I doing wrong? Any ideas? All help is appreciated.
TIA, ~CK