Home » SQL & PL/SQL » Client Tools » Oracle XMLGEN (10.2.0.1.0)
Oracle XMLGEN [message #450417] Wed, 07 April 2010 02:06 Go to next message
prabhakar1223
Messages: 1
Registered: April 2010
Location: Hyderabad
Junior Member
I have the following records in my DEPT table,and when I use a query to generate xmlgen it is resulting only 2 records...can anybody guide me in this regards...and I am very thankful to you if you guide me...


SQL> select * from dept;

    DEPTNO DNAME          LOC
---------- -------------- -------------
        10 ACCOUNTING     NEW YORK
        20 RESEARCH       DALLAS
        30 SALES          CHICAGO
        40 OPERATIONS     BOSTON


SQL> select DBMS_XMLGEN.getXML('SELECT * FROM DEPT') from dual;

DBMS_XMLGEN.GETXML('SELECT*FROMDEPT')
--------------------------------------------------------------------------------

<?xml version="1.0"?>
<ROWSET>
 <ROW>
  <DEPTNO>10</DEPTNO>
  <DNAME>ACCOUNTING<

[Updated on: Wed, 07 April 2010 13:17] by Moderator

Report message to a moderator

Re: Oracle XMLGEN [message #450418 is a reply to message #450417] Wed, 07 April 2010 02:13 Go to previous message
Michel Cadot
Messages: 66518
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
SQL> select DBMS_XMLGEN.getXML('SELECT * FROM DEPT') from dual;
DBMS_XMLGEN.GETXML('SELECT*FROMDEPT')
-----------------------------------------------------------------
<?xml version="1.0"?>
<ROWSET>
 <ROW>
  <DEPTNO>10</DEPTNO>
  <DNAME>ACCOUNTING<

1 row selected.

SQL> set long 10000
SQL> /
DBMS_XMLGEN.GETXML('SELECT*FROMDEPT')
-----------------------------------------------------------------
<?xml version="1.0"?>
<ROWSET>
 <ROW>
  <DEPTNO>10</DEPTNO>
  <DNAME>ACCOUNTING</DNAME>
  <LOC>NEW YORK</LOC>
 </ROW>
 <ROW>
  <DEPTNO>20</DEPTNO>
  <DNAME>RESEARCH</DNAME>
  <LOC>DALLAS</LOC>
 </ROW>
 <ROW>
  <DEPTNO>30</DEPTNO>
  <DNAME>SALES</DNAME>
  <LOC>CHICAGO</LOC>
 </ROW>
 <ROW>
  <DEPTNO>40</DEPTNO>
  <DNAME>OPERATIONS</DNAME>
  <LOC>BOSTON</LOC>
 </ROW>
</ROWSET>

1 row selected.


Regards
Michel
Tell me and I'll forget; show me and I may remember; involve me and I'll understand

[Updated on: Wed, 07 April 2010 02:14]

Report message to a moderator

Previous Topic: TOAD - Execute as Script not available
Next Topic: Display option in sqlplus
Goto Forum:
  


Current Time: Sat Aug 24 05:01:08 CDT 2019