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 a database is related to tablespaces?
Where are the settings stored for each instance in oracle?
How to create tables for odbc connection testing?
What is recovery manager(rman) backup in Oracle?
What is SAVE POINT ?
consider some table with 4 r 5 columns in that 1 col is DATE type. The data is like that,For each date in that col some 3 fields r there but all the records r having different data. Now i want to display all the columns by performing grouping on the date field ( as SELECTION Operator(*) cannot be used with group function having only one "group by clause". how to do this? can any one help me in finding out the solution plss?
How to recover a dropped table in oracle?
What are advantages of dateset in datastage?
18. Display the clientno and total value for all orders placed by that client. Output the result in the following format: Client <clientno> has placed orders to the value of <total value>
What is a system tablespace?
How to calculate date and time differences in oracle?
Youre getting high busy buffer waits - how can you find whats causing it?