Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Usage of ORDER BY in XML

624360Feb 21 2008 — edited Feb 26 2008
I am using a simple table to store records.
I am using sys_xmlgen, xmlforest and xmlagg functions to generate an XML. While the the records re retrived and XML is formed the sequence of the records is not as desired.

for eg: i have got 6 rows in a simple table. When a select query is written with the xml functions the xml is generated but record no 4 always occurs at the end of the xml generated. This is a consistent behaviour and occurs irrespective of all above. I have tried using order by rowid also but the problem persists.

Is there any way to retrive the XML in the order the rows were inserted in the table?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 25 2008
Added on Feb 21 2008
5 comments
3,857 views