Home » Developer & Programmer » JDeveloper, Java & XML » Query Generating XML output
Query Generating XML output [message #296455] Sun, 27 January 2008 10:35 Go to next message
ashishsadana
Messages: 2
Registered: January 2008
Junior Member
It is generating the output in XML format but I am not able to save the output in a file.

select xmlelement("building",
XMLForest(bu.build_id as "ID",bu.branch_id as "BID",
bu.build_name as "NAME",
xmltype(sdo_util.to_gmlgeometry(bu.build_loc)) as
"gml:geometryPropetry",bu.build_desc as "DESCRIPTION")) as thexmlelements
from building bu,branch ba,state st,country co
where bu.branch_id=ba.branch_id
and ba.state_id=st.state_id
and st.country_id=co.country_id;


I have created four tables namely
country
state
branch
building

SQL> desc country;
Name Null? Type
----------------------------------------- -------- --------------
COUNTRY_ID NOT NULL NUMBER(5)
COUNTRY_NAME VARCHAR2(20)

=============================================

SQL> desc building;
Name Null? Type
----------------------------------------- -------- ----------------
BUILD_ID NOT NULL NUMBER(5)
BRANCH_ID NUMBER(5)
BUILD_NAME VARCHAR2(20)
BUILD_LOC SDO_GEOMETRY
BUILD_DESC VARCHAR2(40)
==============================================
SQL> desc branch;
Name Null? Type
----------------------------------------- -------- --------------
BRANCH_ID NOT NULL NUMBER(5)
STATE_ID NUMBER(5)
BRANCH_NAME VARCHAR2(20)
BR_LOC SDO_GEOMETRY
BR_DESC VARCHAR2(40)
STREET_NO NUMBER(10)
CITY_NAME VARCHAR2(20)
==================================================
SQL> desc state;
Name Null? Type
----------------------------------------- -------- --------------
STATE_ID NOT NULL NUMBER(5)
STATE_NAME VARCHAR2(20)
ST_LOC SDO_GEOMETRY
COUNTRY_ID NUMBER
Re: Query Generating XML output [message #296456 is a reply to message #296455] Sun, 27 January 2008 10:40 Go to previous message
ashishsadana
Messages: 2
Registered: January 2008
Junior Member
and yes I cannot run this query on SQL prompt in my application a users will not have access to that.

a user will simply fill a form and on the click of submit button this query runs in tha background and generates a XML output.

But I want to store the output in a file and then make that file available for download to the user.

CAN ANYONE HELP ME??????
Previous Topic: Parse xml and fetch the values
Next Topic: ADF: HowTo Update a table without changing the current row
Goto Forum:
  


Current Time: Sat Dec 10 12:49:41 CST 2016

Total time taken to generate the page: 0.04607 seconds