Home » SQL & PL/SQL » SQL & PL/SQL » retriving xml set (merged)
icon5.gif  retriving xml set (merged) [message #259193] Tue, 14 August 2007 11:12 Go to next message
thani_oracle
Messages: 44
Registered: August 2007
Location: Bangalore
Member

How to Retrive XML out put in oracle 10g

Select ename,sal from emp
where empno = 7900;

ename sal
-----------
King 50000

i want this result like xml set

<root><rec ename = "king" sal = "5000"/></root>

how do i get this result in oracle 10g
Re: retriving xml set [message #259198 is a reply to message #259193] Tue, 14 August 2007 11:24 Go to previous messageGo to next message
DreamzZ
Messages: 1666
Registered: May 2007
Location: Dreamzland
Senior Member
http://www.orafaq.com/forum/t/87303/105911/
help me [message #259544 is a reply to message #259193] Wed, 15 August 2007 23:08 Go to previous messageGo to next message
thani_oracle
Messages: 44
Registered: August 2007
Location: Bangalore
Member

SQL> select dbms_xmlquery.getxml('select * from emp where rownum <= 3') from dual;

DBMS_XMLQUERY.GETXML('SELECT*FROMEMPWHEREROWNUM<=3')
--------------------------------------------------------------------------------
<?xml version = '1.0'?>
<ROWSET>
<ROW num="1">
<EMPNO>7369</EMPNO>



SQL>
Re: help me [message #259545 is a reply to message #259544] Wed, 15 August 2007 23:10 Go to previous messageGo to next message
BlackSwan
Messages: 25033
Registered: January 2009
Location: SoCal
Senior Member
Please read & FOLLOW the STICKY posts at top of this forum.
Re: help me [message #262693 is a reply to message #259545] Tue, 28 August 2007 01:33 Go to previous message
thani_oracle
Messages: 44
Registered: August 2007
Location: Bangalore
Member

Thank you ...... I got
Previous Topic: Differerence between timestamp
Next Topic: generate xml from flat file
Goto Forum:
  


Current Time: Sat Dec 03 12:09:28 CST 2016

Total time taken to generate the page: 0.07191 seconds