Skip to Main Content

APEX

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!

Using XMLElement/XMLAgg, XMLForest in APEX 5.1.4 Report Queries

MichaelK52Nov 7 2018 — edited Nov 7 2018

Hello,

     I am building a report query in APEX 5.1.4. I need to get the XML nested as below.

     I am trying to use the XML Sql Commands. My simple case is below:

SELECT XMLElement("GroupID", GROUP_ID) from our_table.

     I get the error: query column #1 (SELECTXMLElement("GroupID",GROUP_ID)) is invalid, use column alias.

     Am I able to use the SQL XML commands in APEX 5 report queries?

<Groups>

     <Group>

     <GroupID>1</GroupID>

          <Emp>

               <EmpNo>12345</EmpNo>

               <EmpName> John Doe </EmpName>

          </Emp>

          <Emp>

               <EmpNo>67890</EmpNo>

               <EmpName> Jane Doe </EmpName>

          </Emp>

     </Group>

     <Group>

   <GroupID>2</GroupID>

          <Emp>

               <EmpNo>11111</EmpNo>

               <EmpName> Whoever</EmpName>

          </Emp>

   </Group>

</Groups>

Comments
Post Details
Added on Nov 7 2018
2 comments
318 views