627: FROM dual;
628:
629: -- generate the xmltype for failed inv
630: SELECT XMLElement("Invoices",
631: xmlagg(xmlelement("Invoice",
632: xmlforest(seq AS "sequence",
633: Transaction_Num AS
634: "TransactionNum",
635: Transaction_Type AS
644: WHERE SUCCEEDED = 'N';
645:
646: -- generate the xmltype for warning inv
647: SELECT XMLElement("Invoices",
648: xmlagg(xmlelement("Invoice",
649: xmlforest(seq AS "sequence",
650: Transaction_Num AS
651: "TransactionNum",
652: Transaction_Type AS
661: WHERE SUCCEEDED = 'W';
662:
663: --generate the xmltype for succ inv
664: SELECT XMLElement("Invoices",
665: xmlagg(xmlelement("Invoice",
666: xmlforest(SEQ AS "sequence",
667: Transaction_Num AS
668: "TransactionNum",
669: Transaction_Type AS