how to retrive xml data for using sql query?
Answers were Sorted based on User's Feedback
SELECT XMLELEMENT
("Emp", XMLELEMENT("name", e.fname ||' '|| e.lname),
XMLELEMENT ( "hiredate", e.hire))
AS "RESULT"
FROM employees e
WHERE employee_id > 200 ;
This query produces the following typical XML result:
RESULT
-----------------
<Emp>
<name>John Smith</name>
<hiredate>2000-05-24</hiredate>
</Emp>
<Emp>
<name>Mary Martin</name>
<hiredate>1996-02-01</hiredate>
</Emp>
Is This Answer Correct ? | 13 Yes | 0 No |
Answer / ksonga
SET VERIFY OFF
SET ECHO OFF
SET PAGES 0
SET LONG 100000
SET lONGCHUNKSIZE 10000
SET LINESIZE 200
select dbms_xmlgen.getxml('select * from emp') from dual
Is This Answer Correct ? | 7 Yes | 0 No |
How to create a new table in your schema?
select to_char('10','10') from dual This gives me an error oRA-1481 INVALID NUMBER FORMAT MODEL why? pls help
i have procedure p1.and also i declare the same procedure in a package. whice one is efficient package procedure or procedure?
What is logical backup in oracle?
What is partitioned table in Oracle?
How to load a large xml file?
How to get execution path reports on query statements?
What happens internally when the user types userID/password@string in SQL PLUS Thanks-Bhaskar
What is mean by Program Global Area (PGA) ?
acname actype amount ac1 credit 300 ac2 credit 4000 ac1 debit 4000 ac2 debit 455 ac1 credit 500 how to get sum of credit and sum of debit for each account
hai, when to use char and varchar2....?
What is the diff between Oracle and SQL Server