This query
SELECT DeliveryList.qu ery('declare default element namespace
<DeliveryRout e>
<RouteNo>{ sql:column("D.D eliveryRoute") }</RouteNo>
for a$ in /DeliveryList/Delivery/Address
return
<Address>a$</Address>
</DeliveryRoute>' )
as Result
FROM Sales.DeliveryS chedule D
Returns this XML
<DeliveryRout e xmlns="http://schemas.adventu re-works.com/DeliverySchedul e">
<RouteNo>3</RouteNo>
for a$ in /DeliveryList/Delivery/Address
return
<Address>a$</Address></DeliveryRoute>
I need it to return this XML
<DeliveryRout e xmlns="http://schemas.adventu re-works.com/DeliverySchedul e>
<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.qu ery('declare default element namespace
<DeliveryRout e>
<RouteNo>{ sql:column("D.D eliveryRoute") }</RouteNo>
for a$ in /DeliveryList/Delivery/Address
return
<Address>a$</Address>
</DeliveryRoute>' )
as Result
FROM Sales.DeliveryS chedule D
Returns this XML
<DeliveryRout e xmlns="http://schemas.adventu re-works.com/DeliverySchedul e">
<RouteNo>3</RouteNo>
for a$ in /DeliveryList/Delivery/Address
return
<Address>a$</Address></DeliveryRoute>
I need it to return this XML
<DeliveryRout e xmlns="http://schemas.adventu re-works.com/DeliverySchedul e>
<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
Comment