I have a table t in oracle:
select op_id, dimorder, title from t:
OP_ID|DIMORDER|TITLE
-----+--------+-----
312| 1|AAA
312| 2|BBB
I would like to achieve, with dbms_xmlgen.getXml this result (ONLY ONE ROW):
OP_ID|NEW_COLUMN
-----+----------
312|<ROWSET><ROW><DIMORDER>1</DIMORDER><TITLE>AAA</TITLE>
</ROW><ROW><DIMORDER>2</DIMORDER><TITLE>BBB</TITLE></ROW></ROWSET>
Thanks a lot in advance for your help
The SQL/XML generation functions are the preferred way of generating XML from relational data.. Assuming you have multiple set of op_id rows does something like this work..