× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hey all,

I've got to generate an XML that has nested Aggregation levels.

<Thing>
<Levels>
<Level>
<Stuff></Stuff>
<NextLevels>
<NextLevel></NextLevel>
<NextLevel></NextLevel>
</NextLevels >
</Level>
<Level>
<Stuff></Stuff>
<NextLevels>
<NextLevel></NextLevel>
<NextLevel></NextLevel>
</NextLevels >
</Level>
</Levels>
<Thing>

Something like below won't work because the syntax won't allow nested XMLAGG().

SELECT
XMLELEMENT(name "Levels",
XMLELEMENT(name "Stuff",column1),
XMLAGG(LevelsXML
XMLELEMENT(name "NextLevels",
XMLAGG(NextLevelXML)
)
)
)
FROM LevelsXML
Join NextLevelXML using(key1, key2)
GROUP BY Key1, Key2;

Does anyone have an idea of how to pull this off?


Steve Needles




CONFIDENTIAL: The information contained in this email communication is confidential information intended only for the use of the addressee. Unauthorized use, disclosure or copying of this communication is strictly prohibited and may be unlawful. If you have received this communication in error, please notify us immediately by return email and destroy all copies of this communication, including all attachments.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.