You are here: Some XQuery/SQL Server 2005 help please « MsSQL Server « IT news, forums, messages
Some XQuery/SQL Server 2005 help please

Posted by CK on 11/27/06 19:57

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]


Удаленная работа для программистов  •  Как заработать на 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

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