|
Posted by CK on 11/27/06 20:03
Here is the original XML Doc
<?xml version="1.0" ?>
- <DeliveryList xmlns="http://schemas.adventure-works.com/DeliverySchedule">
- <Delivery SalesOrderID="43659">
<CustomerName>Steve Schmidt</CustomerName>
<Address>6126 North Sixth Street, Rockhampton</Address>
</Delivery>
- <Delivery SalesOrderID="43660">
<CustomerName>Tony Lopez</CustomerName>
<Address>6445 Cashew Street, Rockhampton</Address>
</Delivery>
</DeliveryList>
"CK" <c_kettenbach@hotmail.com> wrote in message
news:DqHah.6841$yf7.2082@newssvr21.news.prodigy.net...
> 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
>
>
>
>
Navigation:
[Reply to this message]
|