You are here: Re: Help me with this query please. « MsSQL Server « IT news, forums, messages
Re: Help me with this query please.

Posted by Erland Sommarskog on 10/20/42 11:56

rhaazy (rhaazy@gmail.com) writes:
><root>
><USA>
> <Manistique>
> <M-Sales/>
> <M-IT/>
> </Manistique>
> <Houston>
> <H-Sales/>
> <H-IT/>
> </Houston>
></USA>
><CANADA>
> <Toronto>
> etc...
></root>
>
> Hopefully this format is possible...

It does not seem to be. When I look at the examples for FOR XML EXPLICIT
and FOR XML PATH, they don't lead to that result. And indeed the XML
document above is sort of funny. A more normal document would be:


<ROOT>
<OrgSystem Name="USA">
<UpperOrgNode Name="Manistique">
<LowerOrdNode Name="M-Sales"/>
<LowerOrdNode Name="M-IT"/>
</UpperOrgNode>

etc.

--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

 

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

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