Home » Developer & Programmer » JDeveloper, Java & XML » XMLForest and nested tables
icon7.gif  XMLForest and nested tables [message #170313] Wed, 03 May 2006 04:54
amrom
Messages: 1
Registered: May 2006
Junior Member
Hi,

I have a table with a nested table column. Does anyone know how I can set the element names to the nested table columns?

Thanks

CREATE TYPE ot_xilh_w_120_Clients AS OBJECT (
xilh_CliNum number(12)
,xilh_Title varchar2(10)
,xilh_Forename varchar2(40)
,xilh_Surname varchar2(40)
,xilh_Marital_Status varchar2(10));
/

CREATE type nt_xilh_w_120_Clients as table OF ot_xilh_w_120_Clients;
/

Create table xilh_w_120_lms
(xilh_mortgage varchar2(10)
,xilh_clients nt_xilh_w_120_Clients
,xilh_received date
,xilh_processing_error varchar2(1000)
)
NESTED TABLE xilh_clients STORE AS xilh_clients_TAB;

select xmlelement("ReMortgageInstruction",
( select xmlagg(
xmlelement("Mortgage",
xmlattributes(xilh_mortgage as "AccountNo"),
xmlforest(xilh_clients as "clients"
,xilh_received as "Received"
,xilh_processing_error as "Error")
)
)
)
from xilh_w_120_lms l
)
).EXTRACT('/') as result
from dual;

Previous Topic: How to import excel to oracle database ?
Next Topic: Regarding Help...urgent
Goto Forum:
  


Current Time: Fri Apr 26 00:08:08 CDT 2024