Home » Developer & Programmer » JDeveloper, Java & XML » Export into xml
Export into xml [message #343294] Tue, 26 August 2008 19:09 Go to next message
Messages: 15
Registered: February 2008
Junior Member
I need to export 50 records from one table in Oracle 9i into an xml file. Each record has 5 fields.

Please advise if I can do that and what the command would be in sql plus.
Re: Export into xml [message #343352 is a reply to message #343294] Wed, 27 August 2008 00:44 Go to previous message
Michel Cadot
Messages: 62217
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
SQL> select dbms_xmlquery.getxml('select * from emp where rownum <= 3') from dual;
<?xml version = '1.0'?>
   <ROW num="1">
      <HIREDATE>12/17/1980 0:0:0</HIREDATE>
   <ROW num="2">
      <HIREDATE>2/20/1981 0:0:0</HIREDATE>
   <ROW num="3">
      <HIREDATE>2/22/1981 0:0:0</HIREDATE>

Previous Topic: count node in xmltype data
Next Topic: inserting data finto table from a clob column
Goto Forum:

Current Time: Fri Nov 27 05:52:55 CST 2015

Total time taken to generate the page: 0.08387 seconds