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 can I introduce multiple conditions in like operator?
How do we switch from init.ora file to asp file?
Does oracle charge for java?
What are the execution control statements in oracle?
Can we create trigger on view in oracle?
What are the general rules on data consistency?
1.display list of all users from ur data base.what is the query?
How to establish administrator authentication to the server?
Explain how are indexes update?
Difference between hot backup vs. Cold backup?
What is trigger associated with the timer ?
How to do paging with oracle?