select dbms_xmlgen.getxml('select SHORT_NAME,CHART_OF_ACCOUNTS_ID,PERIOD_SET_NAME from gl_sets_of_books
where rownum <= 3') xml
from dual
It will generate xml data:
<?xml version="1.0"?>
<ROWSET>
<ROW>
<SHORT_NAME>NCR-SDL</SHORT_NAME>
<CHART_OF_ACCOUNTS_ID>50205</CHART_OF_ACCOUNTS_ID>
<PERIOD_SET_NAME>NCR Calendar</PERIOD_SET_NAME>
</ROW>
<ROW>
<SHORT_NAME>NCR SG</SHORT_NAME>
<CHART_OF_ACCOUNTS_ID>50205</CHART_OF_ACCOUNTS_ID>
<PERIOD_SET_NAME>NCR Calendar</PERIOD_SET_NAME>
</ROW>
<ROW>
<SHORT_NAME>NCR JP</SHORT_NAME>
<CHART_OF_ACCOUNTS_ID>50205</CHART_OF_ACCOUNTS_ID>
<PERIOD_SET_NAME>NCR Calendar</PERIOD_SET_NAME>
</ROW>
</ROWSET>
No comments:
Post a Comment