Reply to Re: Some XQuery/SQL Server 2005 help please

Your name:

Reply:


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
>
>
>
>

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация