XML data output in a custom grid table

Hi!
I was wondering if it is possible to display xml data output in a custom-made grid table? Important is the ability to
arrange the fields on the grid layout (not a fixed layout with columns and rows).
I am using the latest JDeveloper release.
Thanks!

See [url http://docs.oracle.com/cd/E14072_01/server.112/e10592/functions251.htm#CIHGGHFB]XMLTABLE
For example:
-- INSERT INTO <your table name>
WITH x AS
(SELECT XMLTYPE('<?xml version="1.0"?>
<ROWSET>
<ROW>
<EMPNO>7782</EMPNO>
<ENAME>CLARK</ENAME>
<JOB>MANAGER</JOB>
<MGR>7839</MGR>
<HIREDATE>09-JUN-81</HIREDATE>
<SAL>2450</SAL>
<DEPTNO>10</DEPTNO>
</ROW>
<ROW>
<EMPNO>7839</EMPNO>
<ENAME>KING</ENAME>
<JOB>PRESIDENT</JOB>
<HIREDATE>17-NOV-81</HIREDATE>
<SAL>5000</SAL>
<DEPTNO>10</DEPTNO>
</ROW>
<ROW>
<EMPNO>7934</EMPNO>
<ENAME>MILLER</ENAME>
<JOB>CLERK</JOB>
<MGR>7782</MGR>
<HIREDATE>23-JAN-82</HIREDATE>
<SAL>1300</SAL>
<DEPTNO>10</DEPTNO>
</ROW>
</ROWSET>') myxml
FROM DUAL)
SELECT *
FROM   x
,      XMLTABLE('/ROWSET/ROW'
         PASSING x.myxml
         COLUMNS empno, ename, job, mgr, hiredate, sal, deptno);

Similar Messages

  • Xml data output problem

    I have table xxemp(No number, Text varchar2(250)), i have created a report and generate xml file and create temple and load data and insert all
    field and when i preview the data in rtf formate at that movement data is not shown in the text field not display.In text field content 3 line of data
    Thanks
    837

    please make sure, your xml data file has some data in it. and when the rtf is made view the output their itself.
    let me know the steps you have followed.
    Thanks
    Ud.

  • How to retreive soap xml data from clob column in a table

    Hi,
    I am trying to retrieve the XML tag value from clob column.
    Table name = xyz and column= abc (clob datatype)
    data stored in abc column is as below
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:head="http://www.abc.com/gcgi/shared/system/header" xmlns:v6="http://www.abc.com/gcgi/services/v6_0_0_0" xmlns:sys="http://www.abc.com/gcgi/shared/system/systemtypes">
    <soapenv:Header xmlns:wsa="http://www.w3.org/2005/08/addressing">
    <RqHeader soapenv:mustUnderstand="0" xmlns="http://www.abc.com/gcgi/shared/system/header">
    <DateAndTimeStamp>2011-12-20T16:02:36.677+08:00</DateAndTimeStamp>
    <UUID>1000002932</UUID>
    <Version>6_0_0_0</Version>
    <ClientDetails>
    <Org>ABC</Org>
    <OrgUnit>ABC</OrgUnit>
    <ChannelID>HBK</ChannelID>
    <TerminalID>0000</TerminalID>
    <SrcCountryCode>SG</SrcCountryCode>
    <DestCountryCode>SG</DestCountryCode>
    <UserGroup>HBK</UserGroup>
    </ClientDetails>
    </RqHeader>
    <wsa:Action>/SvcImpl/bank/
    SOAPEndpoint/AlertsService.serviceagent/OpEndpointHTTP/AlertDeleteInq</wsa:Action></soapenv:Header>
    <soapenv:Body>
    <v6:AlertDeleteInqRq>
    <v6:Base>
    <v6:VID>20071209013112</v6:VID>
    <!--Optional:-->
    <v6:Ref>CTAA00000002644</v6:Ref>
    </v6:Base>
    </v6:AlertDeleteInqRq>
    </soapenv:Body>
    </soapenv:Envelope>
    And i want to retrieve the values of tag
    <ChannelID> and <v6:VID>
    can somebody help, i have tried with extractvalue but not able to get the values

    I have used the below two queries but not able to get the expected results. Both queries result into no values.
    select xmltype(MED_REQ_PAYLOAD).extract('//ClientDetails/Org','xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" || xmlns="http://www.abc.com/gcgi/shared/system/header"').getStringValue() from ESB_OUTPUT_TEMP where SOAPACTION = '/SvcImpl/bank/alerts/v6_0_0_0/SOAPEndpoint/AlertsService.serviceagent/OpEndpointHTTP/AlertDeleteInq'
    select EXTRACTVALUE(xmltype(MED_REQ_PAYLOAD),'/RqHeader/) from ESB_OUTPUT_TEMP where SOAPACTION = '/SvcImpl/bank/SOAPEndpoint/AlertsService.serviceagent/OpEndpointHTTP/AlertDeleteInq'
    Well, for starters, both queries are syntactically wrong :
    - non terminated string
    - incorrect namespace mapping declaration
    - unknown XMLType method "getStringValue()"
    Secondly, all those functions are deprecated now.
    Here's an up-to-date example using XMLTable. It will retrieve the two tag values you mentioned :
    SQL> select x.*
      2  from esb_output_temp t
      3     , xmltable(
      4         xmlnamespaces(
      5           'http://schemas.xmlsoap.org/soap/envelope/' as "soap"
      6         , 'http://www.abc.com/gcgi/shared/system/header' as "head"
      7         , 'http://www.abc.com/gcgi/services/v6_0_0_0' as "v6"
      8         )
      9       , '/soap:Envelope'
    10         passing xmlparse(document t.med_req_payload)
    11         columns ChannelID  varchar2(10) path 'soap:Header/head:RqHeader/head:ClientDetails/head:ChannelID'
    12               , VID        varchar2(30) path 'soap:Body/v6:AlertDeleteInqRq/v6:Base/v6:VID'
    13       ) x
    14  ;
    CHANNELID  VID
    HBK        20071209013112
    You may also want to store XML in XMLType columns for both performance and storage optimizations.

  • XML data (Output) into a flat file

    I need to convert XML data into a flat file, which is having "|" as delimiter and ftp the same to a server. The XML data is an output of BPEL activity. The XML data is employee records. Each employee records should come as one line in the flat file.
    Is it possible to do this? if so, what will be the steps
    Thanks

    Hi,
    You need to use file adapter to write your XML payload as a flat file.
    Following are the steps to write XML payload into a flat file:
    1. Create a sample flat file and add few rows in which fields should be delimited with pipe symbol. See the record sample given below:
    Name|Age|Address|City|State|Zip
    Sam|32|2788 Viking Dr|Green Bay|WI|54304
    Here first row is the header row, you can remove the header row if it is not required.
    2. Create a file adapter service using adapter configuration wizard. Give file name and folder location where you want to write flat file. On step 5 of the adapter configuration wizard you have to define or select message schema. Click on Define Schema for Native Format button, then Native Format Builder Wizard will be opened, here you can define message schema for your flat file.
    2.1 Here you need to select Delimited for file type.
    2.2 Give details about your flat file, select your sample flat file here, which you have created in step 1 above.
    2.3 Click Next button twice and go to step 4, here give namespace and element names you want and click on Next.
    2.4 In step 5 you need to specify delimiters. Wizard doesn’t shows *|* as a delimiter so you need to enter *|* in the Delimited By combo box and click on Next button.
    2.5 Complete remaining steps and click on Finish in the wizard.
    3. Finish "Adapter Creation Wizard". Add BPEL activities (assign, invoke) to pass XML payload to file adapter and file adapter will generate *|* delimited flat file and write it to the given folder.
    See the following article for more details on Native Format Builder Wizard:
    http://download-uk.oracle.com/docs/cd/B31017_01/integrate.1013/b28994/nfb.htm#CCHCIGCA
    Regards,
    Dharmendra
    http://soa-howto.blogspot.com

  • XML data output file in a directory needs to be published as a pdf report

    Hi,
    I have already got an XML output file in a directory.
    I want to display it using RTF template using a concurrent program or some sort of java api in a pdf format to be able to print it.
    How do I do it? Do I have to write another file output command to read the xml data line by line and output to BI publisher first?

    Hi,
    Hmm, one way is to just utl_file read the file and fnd_file.put_line(fnd_file.output) then close the file. Setup conc prog, rtf template, data definition and you're done.
    But the main thing is that you get the XML file to $APPLCSF/$APPLOUT/oXXXXX.out where XXXXX is the request id. You could just setup host concurrent program and copy the file there!
    Regards,
    Gareth
    Blog: http://garethroberts.blogspot.com/
    Message was edited by:
    gareth.roberts
    Message was edited by:
    gareth.roberts

  • Error with XML data output

    The Employee W2 XML Interface finished with Warning. In the output there's partial data and at the with the following error:
    <SS_WITHHELD>3403.15</SS_WITHHELD
    &gThe XML page cannot be displayed
    Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.
    Only one top level element is allowed in an XML document. Error processing resource 'http://cvlx12.vancouver.center:8002/OA...
    <W2REGISTER>
    -^
    t;
    <MED_WAGES>54889.55</MED_WAGES>
    <MED_WITHHELD>795.9</MED_WITHHELD>
    Also the concurrent request log file shows:
    Beginning post-processing of request 3877215 on node CVLX12 at 16-NOV-2010 11:54:50.
    Post-processing of request 3877215 failed at 16-NOV-2010 11:54:50 with the error message:
    One or more post-processing actions failed. Consult the OPP service log for details.
    But the Output Post Processor is up running. If I go to the server I will be able to see the output just created ok. Anyone know what's wrong? Thanks

    Thanks for your response. I have ftp the file from server and it looks good. But When I ran XML Report Publish against this request, it was error out, message:
    Process template
    --XDOException
    java.lang.reflect.InvocationTargetException
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at oracle.apps.xdo.common.xml.XSLT10gR1.invokeParse(XSLT10gR1.java:570)
         at oracle.apps.xdo.common.xml.XSLT10gR1.transform(XSLT10gR1.java:235)
         at oracle.apps.xdo.common.xml.XSLTWrapper.transform(XSLTWrapper.java:182)
         at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(FOUtility.java:1044)
         at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(FOUtility.java:997)
         at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(FOUtility.java:212)
         at oracle.apps.xdo.template.FOProcessor.createFO(FOProcessor.java:1665)
         at oracle.apps.xdo.template.FOProcessor.generate(FOProcessor.java:975)
         at oracle.apps.xdo.oa.schema.server.TemplateHelper.runProcessTemplate(TemplateHelper.java:5936)
         at oracle.apps.xdo.oa.schema.server.TemplateHelper.processTemplate(TemplateHelper.java:3459)
         at oracle.apps.xdo.oa.schema.server.TemplateHelper.processTemplate(TemplateHelper.java:3548)
         at oracle.apps.xdo.oa.cp.JCP4XMLPublisher.runProgram(JCP4XMLPublisher.java:684)
         at oracle.apps.fnd.cp.request.Run.main(Run.java:157)
    Caused by: org.xml.sax.SAXParseException: <Line 268, Column 6>: XML-20109: (Fatal Error) PI with the name 'xml' can occur only in the beginning of the document.
         at oracle.xdo.parser.v2.XMLError.flushErrorHandler(XMLError.java:441)
         at oracle.xdo.parser.v2.XMLError.flushErrors1(XMLError.java:303)
         at oracle.xdo.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:305)
         at oracle.xdo.parser.v2.XMLParser.parse(XMLParser.java:289)
         ... 17 more
    I have registered Employee W2 XML Interface with XML Publisher with Oracle seeded template. Thanks,

  • Reading  xml data from url and insert into table

    CREATE TABLE url_tab2
    URL_NAME VARCHAR2(100),
    URL SYS.URIType
    INSERT INTO url_tab2 VALUES
    (’This is a test URL’,
    sys.UriFactory.getUri(’http://www.domain.com/test.xml’)
    it is giving error as invalid character

    Check if your single quotes are the correct single quotes.
    The principle works as advertised in the XMLDB Developers Guide...
    C:\>sqlplus / as sysdba
    SQL*Plus: Release 11.1.0.7.0 - Production on Tue Nov 25 21:44:46 2008
    Copyright (c) 1982, 2008, Oracle.  All rights reserved.
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SQL> create user OTN identified by OTN account unlock;
    User created.
    SQL> grant dba, xdbadmin to OTN;
    Grant succeeded.
    SQL> conn OTN/OTN
    Connected.
    SQL> CREATE TABLE uri_tab (docUrl SYS.URIType, docName VARCHAR2(200));
    Table created.
    SQL> -- Method SYS.URIFACTORY.getURI() with absolute URIs
    SQL> -- Insert an HTTPUri with absolute URL into SYS.URIType using URIFACTORY.
    SQL> -- The target is Oracle home page.
    SQL> INSERT INTO uri_tab VALUES
      2  (SYS.URIFACTORY.getURI('http://www.oracle.com'), 'AbsURL');
    1 row created.
    SQL> -- Insert an HTTPUri with relative URL using constructor SYS.HTTPURIType.
    SQL> -- Note the absence of prefix http://. The target is the same.
    SQL> INSERT INTO uri_tab VALUES (SYS.HTTPURIType('www.oracle.com'), 'RelURL');
    1 row created.
    SQL> -- Insert a DBUri that targets employee data from database table hr.employees.
    SQL>
    SQL> INSERT INTO uri_tab VALUES
      2  (SYS.URIFACTORY.getURI('/oradb/HR/EMPLOYEES/ROW[EMPLOYEE_ID=200]'), 'Emp200');
    1 row created.
    SQL> SELECT e.docUrl.getCLOB(), docName FROM uri_tab e;
    E.DOCURL.GETCLOB()
    DOCNAME
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN
    ">
    <html>
    <head>
    AbsURL
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN
    ">
    <html>
    E.DOCURL.GETCLOB()
    DOCNAME
    <head>
    RelURL
    <?xml version="1.0"?>
    <ROW>
      <EMPLOYEE_ID>200</EMPLOYEE_ID>
      <FIRST_NAME>Jenn
    Emp200
    SQL> set long 1000
    SQL> select HTTPURITYPE('www.oracle.com').getCLob() from dual;
    HTTPURITYPE('WWW.ORACLE.COM').GETCLOB()
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN
    ">
    <html>
    <head>
    <title>Oracle 11g, Siebel, PeopleSoft |
    Oracle, The World's Largest Enterprise S
    oftware Company</title>
    <meta name="title" content="Enterprise Applications | D
    atabase | Fusion Middleware | Applicatio
    ns Unlimited | Business | Oracle, The Wo
    rld's Largest Enterprise Software CompanEdited by: Marco Gralike on Nov 25, 2008 10:13 PM

  • Load XML-data from large file into plain table

    We have to load data from an XML file to a relational table row by row.
    The structure of the data is very simple:
    <ROOT>
    <repReport>
    <KNZ>XY</KNZ>
    <LA>test123</LA>
    <Ident>AA20</Ident>
    </repReport>
    <repReport>
    </repReport>
    </ROOT>.
    The table econtains the fields KNZ, LA, Ident, ...
    If the file is small the following PL/SQL-code works fine:
    CREATE OR REPLACE PROCEDURE Loadxml_Epd AS
    fil BFILE ;
    len INTEGER;
    insrow INTEGER;
    ctxHdl NUMBER;
    buffer_c CLOB ;
    amt NUMBER := dbms_lob.lobmaxsize;
    src_offset NUMBER := 1 ;
    dst_offset NUMBER := 1 ;
    lang_ctx NUMBER := dbms_lob.default_lang_ctx;
    warning NUMBER;
    errNo NUMBER;
    errMsg VARCHAR2(1999);
    BEGIN
    fil := BFILENAME('XML_DIR','200412MKBReport.xml');
    DBMS_LOB.OPEN(fil, DBMS_LOB.LOB_READONLY);
    len := DBMS_LOB.GETLENGTH(fil);
    INSERT INTO INIT_CLOB(init) VALUES( EMPTY_CLOB())
    RETURNING init INTO buffer_c;
    dbms_lob.loadfromfile(buffer_c,fil, amt, dst_offset, src_offset);
    ctxHdl := dbms_xmlsave.newContext ('SST_XML_EPD');
    dbms_xmlsave.setRowTag (ctxHdl , 'repReport');
    dbms_xmlsave.SetIgnoreCase(ctxHdl , 1);
    dbms_xmlsave.SetSqlToXmlnameEscaping (ctxHdl , TRUE);
    dbms_xmlsave.propagateOriginalException(ctxHdl , TRUE);
    dbms_xmlsave.SetCommitBatch(ctxHdl , 1);
    dbms_xmlsave.SetBatchSize(ctxHdl , 1);
    insrow := DBMS_XMLSAVE.insertXML(ctxHdl,buffer_c);
    DBMS_OUTPUT.PUT_LINE('Anzahl Sätze:' || TO_CHAR(insrow,'999999999'));
    IF DBMS_LOB.ISOPEN(fil) = 1 THEN
    DBMS_LOB.CLOSE(fil);
    END IF;
    EXCEPTION
    WHEN OTHERS THEN
    DBMS_OUTPUT.PUT_LINE(SQLCODE);
    errMsg := SQLERRM;
    DBMS_OUTPUT.PUT_LINE(SUBSTR(errMsg,1,2000));
    IF DBMS_LOB.ISOPEN(fil) = 1 THEN
    DBMS_LOB.CLOSE(fil);
    END IF;
    END;
    But if the file is larger (50 MB in our case) this does not work. In various documents we found that we have to use another sort of XML-parser but we did not find any example how this is really done.
    Does anybody have an example how to load this data that is as simple as our problem?

    We have to load data from an XML file to a relational table row by row.
    The structure of the data is very simple:
    <ROOT>
    <repReport>
    <KNZ>XY</KNZ>
    <LA>test123</LA>
    <Ident>AA20</Ident>
    </repReport>
    <repReport>
    </repReport>
    </ROOT>.
    The table econtains the fields KNZ, LA, Ident, ...
    If the file is small the following PL/SQL-code works fine:
    CREATE OR REPLACE PROCEDURE Loadxml_Epd AS
    fil BFILE ;
    len INTEGER;
    insrow INTEGER;
    ctxHdl NUMBER;
    buffer_c CLOB ;
    amt NUMBER := dbms_lob.lobmaxsize;
    src_offset NUMBER := 1 ;
    dst_offset NUMBER := 1 ;
    lang_ctx NUMBER := dbms_lob.default_lang_ctx;
    warning NUMBER;
    errNo NUMBER;
    errMsg VARCHAR2(1999);
    BEGIN
    fil := BFILENAME('XML_DIR','200412MKBReport.xml');
    DBMS_LOB.OPEN(fil, DBMS_LOB.LOB_READONLY);
    len := DBMS_LOB.GETLENGTH(fil);
    INSERT INTO INIT_CLOB(init) VALUES( EMPTY_CLOB())
    RETURNING init INTO buffer_c;
    dbms_lob.loadfromfile(buffer_c,fil, amt, dst_offset, src_offset);
    ctxHdl := dbms_xmlsave.newContext ('SST_XML_EPD');
    dbms_xmlsave.setRowTag (ctxHdl , 'repReport');
    dbms_xmlsave.SetIgnoreCase(ctxHdl , 1);
    dbms_xmlsave.SetSqlToXmlnameEscaping (ctxHdl , TRUE);
    dbms_xmlsave.propagateOriginalException(ctxHdl , TRUE);
    dbms_xmlsave.SetCommitBatch(ctxHdl , 1);
    dbms_xmlsave.SetBatchSize(ctxHdl , 1);
    insrow := DBMS_XMLSAVE.insertXML(ctxHdl,buffer_c);
    DBMS_OUTPUT.PUT_LINE('Anzahl Sätze:' || TO_CHAR(insrow,'999999999'));
    IF DBMS_LOB.ISOPEN(fil) = 1 THEN
    DBMS_LOB.CLOSE(fil);
    END IF;
    EXCEPTION
    WHEN OTHERS THEN
    DBMS_OUTPUT.PUT_LINE(SQLCODE);
    errMsg := SQLERRM;
    DBMS_OUTPUT.PUT_LINE(SUBSTR(errMsg,1,2000));
    IF DBMS_LOB.ISOPEN(fil) = 1 THEN
    DBMS_LOB.CLOSE(fil);
    END IF;
    END;
    But if the file is larger (50 MB in our case) this does not work. In various documents we found that we have to use another sort of XML-parser but we did not find any example how this is really done.
    Does anybody have an example how to load this data that is as simple as our problem?

  • Dynamics crm 2015 import fail entity ribbon XML data that represents the customized elements of the ribbon for an enitity" error.

    while import the solution into dynamics crm 2015.import fail is getting.could anybody help me on this.
    hsk srinivas

    Hello,
    I believe first step is to Download Log File and recheck it for error.
    Dynamics CRM MVP/ Technical Evangelist at
    SlickData LLC
    My blog

  • XML DATA INSERTION INTO TABLE

    I have xml data in this format and need to store in the lineitem table by generating three new values for each row ie line identifier(sys_guid),begin_date and end_date.
    <LineItems>
    <LineItem>
    <BASE_TYPE>SRV</BASE_TYPE>
    <ORDER_NUM>124089304</ORDER_NUM>
    <WIP_STATUS>S</WIP_STATUS>
    <WIP_STATUS_DATE>8/1/2006 8:44:55 PM</WIP_STATUS_DATE>
    <order_date>6/21/2006 12:00:00 AM</order_date>
    <IP_DATE>6/21/2006 12:00:00 AM</IP_DATE>
    </LineItem>
    <LineItem>
    <BASE_TYPE>SRV</BASE_TYPE>
    <ORDER_NUM>124089304</ORDER_NUM>
    <WIP_STATUS>S</WIP_STATUS>
    <WIP_STATUS_DATE>8/1/2006 8:44:55 PM</WIP_STATUS_DATE>
    <order_date>6/21/2006 12:00:00 AM</order_date>
    <IP_DATE>6/21/2006 12:00:00 AM</IP_DATE>
    </LineItem>
    </LineItems>
    and using this method to insert
    SELECT EXTRACTVALUE(VALUE(T), 'LineItem/BASE_TYPE'),
    EXTRACTVALUE(VALUE(T), 'LineItem/ORDER_NUM'),
    EXTRACTVALUE(VALUE(T), 'LineItem/WIP_STATUS'),
    EXTRACTVALUE(VALUE(T), 'LineItem/WIP_STATUS_DATE')),
    EXTRACTVALUE(VALUE(T), 'LineItem/ORDER_DATE')),
    EXTRACTVALUE(VALUE(T), 'LineItem/IP_DATE')),
    EXTRACTVALUE(VALUE(T), 'LineItem/SHIP_BY_DATE')),
    EXTRACTVALUE(VALUE(T), 'LineItem/CUSTOMER_SRC'),
    EXTRACTVALUE(VALUE(T), 'LineItem/CUSTOMER_LOC'),
    EXTRACTVALUE(VALUE(T), 'LineItem/CUSTOMER_NUM'),
    EXTRACTVALUE(VALUE(T), 'LineItem/ACCOUNT_TYPE'),
    EXTRACTVALUE(VALUE(T), 'LineItem/OVERPACK_FLAG'),
    EXTRACTVALUE(VALUE(T), 'LineItem/INTERNATIONAL_FLAG'),
    EXTRACTVALUE(VALUE(T), 'LineItem/MULTIPLE_SYSTEM_TIES'),
    EXTRACTVALUE(VALUE(T), 'LineItem/ORDER_TIE_NUM'),
    EXTRACTVALUE(VALUE(T), 'LineItem/TIE_STATUS'),
    EXTRACTVALUE(VALUE(T), 'LineItem/PK_GEN'),
    EXTRACTVALUE(VALUE(T), 'LineItem/QTY_REQD'),
    EXTRACTVALUE(VALUE(T), 'LineItem/WORKCENTER_ID'),
    EXTRACTVALUE(VALUE(T), 'LineItem/SI_NUMBER'),
    EXTRACTVALUE(VALUE(T), 'LineItem/MFG_SCHED_FACILITY_ID'),
    EXTRACTVALUE(VALUE(T), 'LineItem/MFG_FACILITY_ID'),
    EXTRACTVALUE(VALUE(T), 'LineItem/PILOT_NAME'),
    EXTRACTVALUE(VALUE(T), 'LineItem/ENG_HOLD_FLAG'),
    EXTRACTVALUE(VALUE(T), 'LineItem/SHORT_FLAG'),
    EXTRACTVALUE(VALUE(T), 'LineItem/OVR_SHORTAGE'),
    EXTRACTVALUE(VALUE(T), 'LineItem/USER_HOLD_FLAG'),
    EXTRACTVALUE(VALUE(T), 'LineItem/SHIP_TO_ADDRESS_SEQ_NUM'),
    EXTRACTVALUE(VALUE(T), 'LineItem/CALICO_REF_NUM'),
    EXTRACTVALUE(VALUE(T), 'LineItem/CONFIG_ID'),
    EXTRACTVALUE(VALUE(T), 'LineItem/TOTAL_UNITS_QTY'),
    EXTRACTVALUE(VALUE(T), 'LineItem/ORDER_TYPE'),
    EXTRACTVALUE(VALUE(T), 'LineItem/SKU'),
    EXTRACTVALUE(VALUE(T), 'LineItem/SUB_ASSEMBLY_NUMBER'),
    EXTRACTVALUE(VALUE(T), 'LineItem/BASE_ASM_FLAG'),
    EXTRACTVALUE(VALUE(T), 'LineItem/QTY_REQ'),
    EXTRACTVALUE(VALUE(T), 'LineItem/ORIGINAL_PART_NUMBER'),
    EXTRACTVALUE(VALUE(T), 'LineItem/SUBSTITUTE_PART_NUMBER'),
    EXTRACTVALUE(VALUE(T), 'LineItem/QTY_EXTENDED'),
    EXTRACTVALUE(VALUE(T), 'LineItem/ISSUE_CODE'),
    EXTRACTVALUE(VALUE(T), 'LineItem/ORIG_PART_DESC'),
    EXTRACTVALUE(VALUE(T), 'LineItem/ORIG_COMMODITY_CODE'),
    EXTRACTVALUE(VALUE(T), 'LineItem/ORIG_PRINT_ON_TRAVELER_FLAG'),
    EXTRACTVALUE(VALUE(T), 'LineItem/ORIG_BOX_CODE'),
    EXTRACTVALUE(VALUE(T), 'LineItem/SUBST_PART_DESC'),
    EXTRACTVALUE(VALUE(T), 'LineItem/SUBST_COMMODITY_CODE'),
    EXTRACTVALUE(VALUE(T), 'LineItem/SUBST_PRINT_ON_TRAVELER_FLAG'),
    EXTRACTVALUE(VALUE(T), 'LineItem/SUBST_BOX_CODE')
         BULK COLLECT INTO
    V_BASE_TYPE,
    V_ORDER_NUM,
    V_WIP_STATUS,
    V_WIP_STATUS_DATE,
    V_ORDER_DATE,
    V_IP_DATE,
    V_SHIP_BY_DATE,
    V_CUSTOMER_SRC,
    V_CUSTOMER_LOC,
    V_CUSTOMER_NUM,
    V_ACCOUNT_TYPE,
    V_OVERPACK_FLAG,
    V_INTERNATIONAL_FLAG,
    V_MULTIPLE_SYSTEM_TIES,
    V_ORDER_TIE_NUM,
    V_TIE_STATUS,
    V_PK_GEN,
    V_QTY_REQD,
    V_WORKCENTER_ID,
    V_SI_NUMBER,
    V_MFG_SCHED_FACILITY_ID,
    V_MFG_FACILITY_ID,
    V_PILOT_NAME,
    V_ENG_HOLD_FLAG,
    V_SHORT_FLAG,
    V_OVR_SHORTAGE,
    V_USER_HOLD_FLAG,
    V_SHIP_TO_ADDRESS_SEQ_NUM,
    V_CALICO_REF_NUM,
    V_CONFIG_ID,
    V_TOTAL_UNITS_QTY,
    V_ORDER_TYPE,
    V_SKU#,
    V_SUB_ASSEMBLY_NUMBER,
    V_BASE_ASM_FLAG,
    V_QTY_REQ,
    V_ORIGINAL_PART_NUMBER,
    V_SUBSTITUTE_PART_NUMBER,
    V_QTY_EXTENDED,
    V_ISSUE_CODE,
    V_ORIG_PART_DESC,
    V_ORIG_COMMODITY_CODE,
    V_ORIG_PRINT_ON_TRAVELER_FLAG,
    V_ORIG_BOX_CODE,
    V_SUBST_PART_DESC,
    V_SUBST_COMMODITY_CODE,
    V_SUBST_PRINT_ON_TRAVELER_FLAG,
    V_SUBST_BOX_CODE
    FROM TABLE(XMLSEQUENCE(EXTRACT(P_PODETAILS_XML, '/LineItems/LineItem'))) T
    but getting performace problem. I'm able to insert 100 lines items in 3 sec but requirement is further less.
    Any help..... ????
    thanks in adavance..

    hi..
    me too having same type of XML data to be inserted into oracle table
    i've to write procedure for this
    can u help me plz.....

  • Store XML data as relational data into Oracle tables using Java and XMLType

    I want to store xml data into an Oracle 11g table as relational storage, not as CLOB or Binary storage. Then I should also be able to query and fetch this data from table into an XML file.
    Any hint on how to write java code using XMLType to achieve this?
    Any help would be appreciated.

    Thanks for the explanation. I still have few confusions. I will try to elaborate my requirement with a simple example...
    I have the following xsd and xml files. "note" would be the table in database and "to", "from", "heading" and "body" would be the columns of note table. "Tove", "Jan", "Reminder" and "Don't forget me this weekend!" would go as data in one row of note table.
    How do I create note table with the xml schema (xsd file)?
    Should the note table be of XMLType or the columns?
    How do I load the XML data into the columns of note table?
    How do I retrieve the row of note table as XML file?
    XML Schema:
    <?xml version="1.0"?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
    targetNamespace="http://www.xxxxx.com"
    xmlns="http://www.xxxxx.com"
    elementFormDefault="qualified">
    <xs:element name="note">
      <xs:complexType>
        <xs:sequence>
          <xs:element name="to" type="xs:string"/>
          <xs:element name="from" type="xs:string"/>
          <xs:element name="heading" type="xs:string"/>
          <xs:element name="body" type="xs:string"/>
        </xs:sequence>
      </xs:complexType>
    </xs:element>
    XML Data:
    <?xml version="1.0"?>
    <note>
      <to>Tove</to>
      <from>Jan</from>
      <heading>Reminder</heading>
      <body>Don't forget me this weekend!</body>
    </note>

  • How to load xml data into a database table....

    Hi All,
    Iam new to this forum.I have an xmldoc table of xmltype(datatype).Iam able to insert xml data to it.I have another table called new_books.sql:
    CREATE TABLE NEW_BOOKS
    TITLE          VARCHAR2(255) NOT NULL,
    LINK          VARCHAR2(80) NULL,
    PUBLISHER     VARCHAR2(255) NULL,
    SUBJECT     VARCHAR2(80) NULL,
    PUBDATE     VARCHAR2(40) NULL,
    DESCRIPTION     VARCHAR2(4000) NULL,
    AUTHOR     VARCHAR2(80) NULL,
    PRIMARY      KEY(TITLE)
    Now i want to copy the data in the xmldoc table into the table new_books.sql.Is there any procedure to do that in PL/SQL?
    Given below is the xmlfile:
    - <rdf>
    - <item>
    <title>Enterprise SOA: Designing IT for Business Innovation</title>
    <link>http://safari.oreilly.com/0596102380?a=102682</link>
    <publisher>O'Reilly</publisher>
    <creator>Thomas Mattern</creator>
    <creator>Dan Woods</creator>
    <subject>IT Infrastructure</subject>
    <date>April 2006</date>
    </item>
    </rdf>
    Thanks in Advance,
    Gita.

    Assuming the table xmldoc(of xmltype) has this XML
    SQL> select * from xmldoc;
    SYS_NC_ROWINFO$
    <rdf>
    <item>
    <title>Enterprise SOA: Designing IT for Business Innovation</title>
    <link>http://safari.oreilly.com/0596102380?a=102682</link>
    <publisher>O'Reilly</publisher>
    <creator>Thomas Mattern</creator>
    <creator>Dan Woods</creator>
    <subject>IT Infrastructure</subject>
    <date>April 2006</date>
    </item>
    </rdf>
    SQL> INSERT INTO NEW_BOOKS(TITLE, LINK, PUBLISHER, SUBJECT)
      2  select extractvalue(value(x),'/rdf/item/title') as title,
      3  extractvalue(value(x),'/rdf/item/link') as link,
      4  extractvalue(value(x),'/rdf/item/publisher') as publisher,
      5  extractvalue(value(x),'/rdf/item/subject') as subject
      6  from xmldoc x
      7  ;
    1 row created.

  • How to parse XML Column and insert values into a table

    Hello,
    I am working on a simple project to demonstrate how to load and extract XML using SQL, I have already made a table that contains a column of XMLTYPE and loaded an XML file into it (code below)
    create or replace directory XMLSRC as 'C:\XMLSRC';
    drop table Inventory;
    create table Inventory(Inv XMLTYPE);
    INSERT INTO Inventory VALUES (XMLTYPE(bfilename('XMLSRC', 'Inventory.xml'),nls_charset_id('AL32UTF')));
    select * from Inventory;
    I now however need to get the XML data back out of that and loaded into a new table. Troubleshooting guides I have read online seem to only be dealing with parsing an external XML document and loading it into a table, and not what I need to do which is parse a column of XML data and load that into a table. The project trivial with simple tables containing only 3 columns.
    The table that needs to be loaded is as follows:
    create table InventoryOut(PartNumber Number(10), QTY Number(10), WhLocation varchar2(500));
    The XML document is as follows:
    <?xml version="1.0" encoding="UTF-8"?>
    <dataroot xmlns:od="urn:schemas-microsoft-com:officedata" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="Inventory.xsd" generated="2012-04-09T17:36:30">
    <Inventory>
    <PartNumber>101</PartNumber>
    <QTY>12</QTY>
    <WhLocation>WA</WhLocation>
    </Inventory>
    </dataroot>
    Thank you for any help you can offer.

    First of all, thank you for your help!! Still stunned that you actually took the time to write out an eample using my tables/names/etc. Thank you!!
    Attached is the code, there seems to be an issue with referencing the other table, Inventory.Inv, I checked and that table and the Inv column are showing up in the database so I am not sure why it is having issues locating them, take a look at the code I wrote as well as the output (*I included the real version number for you this time :)
    EDIT: In your code right here:
    select xt.*
    3 from Inventory inve,
    4 XMLTable('/dataroot/Inventory'
    5 PASSING inve.Inv
    I think is where I am messing it up, perhaps not understanding fully what is going on, as you write "Inventory inve" and "inve.Inv" ---- Is inve a keyword that I am just not familiar with? I think this is where the issues lies in my code.
    END EDIT
    EDIT2: Well that looks like it was it, changed that to how you have it and it now works!!! Could you please explain what that few lines is doing, and what the xt.* and inve are doing? Thanks again!!!
    END EDIT2
    drop table InventoryOut;
    create table InventoryOut (PartNumber number(10), QTY number(10), WhLocation varchar2(500));
    insert into InventoryOut (PartNumber, QTY, WhLocation)
    select xt.*
    from Inventory Inv,
    XMLTable('/dataroot/Inventory'
    PASSING Inventory.Inv COLUMNS
    PartNumber number path 'PartNumber',
    QTY number path 'QTY',
    WhLocation path 'WhLocation')xt;
    select * from InventoryOut;
    select * from v$version;
    table INVENTORYOUT dropped.
    table INVENTORYOUT created.
    Error starting at line 4 in command:
    insert into InventoryOut (PartNumber, QTY, WhLocation)
    select xt.*
    from Inventory Inv,
    XMLTable('/dataroot/Inventory'
    PASSING Inventory.Inv COLUMNS
    PartNumber number path 'PartNumber',
    QTY number path 'QTY',
    WhLocation path 'WhLocation')xt
    Error at Command Line:8 Column:12
    Error report:
    SQL Error: ORA-00904: "INVENTORY"."INV": invalid identifier
    00904. 00000 - "%s: invalid identifier"
    *Cause:   
    *Action:
    PARTNUMBER QTY WHLOCATION
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
    PL/SQL Release 11.2.0.1.0 - Production
    CORE     11.2.0.1.0     Production
    TNS for 32-bit Windows: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - Production
    If this helps here is the code and output for the creation of the Inventory table itself:
    create or replace directory XMLSRC as 'C:\XMLSRC';
    drop table Inventory;
    create table Inventory(Inv XMLTYPE);
    INSERT INTO Inventory VALUES (XMLTYPE(bfilename('XMLSRC', 'Inventory.xml'),nls_charset_id('AL32UTF')));
    select * from Inventory;
    directory XMLSRC created.
    table INVENTORY dropped.
    table INVENTORY created.
    1 rows inserted.
    INV
    <?xml version="1.0" encoding="WINDOWS-1252"?>
    <dataroot xmlns:od="urn:schemas-microsoft-com:officedata" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="Inventory.xsd" generated="2012-04-09T17:36:30">
    <Inventory>
    <PartNumber>101</PartNumber>
    <QTY>12</QTY>
    <WhLocation>WA</WhLocation>
    </Inventory>
    </dataroot>
    Thanks again for your help so far! Hope we can get this working :)
    Edited by: 926502 on Apr 11, 2012 2:47 PM
    Edited by: 926502 on Apr 11, 2012 2:49 PM
    Edited by: 926502 on Apr 11, 2012 2:54 PM
    Edited by: 926502 on Apr 11, 2012 2:54 PM
    Updated issue to solved - Edited by: 926502 on Apr 11, 2012 2:55 PM

  • Getting XML Data

    I create a Data Model and Save it When i click on Get XML output the data it shows a blank page XML data is not displayed and later when i try to create a Report based on existing DM it gives a message...NO Sample data is saved for the existing DM.... Can anyone help?

    From 11g
    When you created data model and view xml you gave drow down option on the right top saying
    Export xml
    Save as sample data
    Get data engine log.
    Once you completed creating daramodel and view xml please click that option save as sample data . The xml which you viewed will be saved as sample xml file for that data model.
    It is must if you want ti upload a template to created data model.
    It is a one time job that we need to do whenever we create a new datamodel.
    for reference u can check the below link.
    Viewing the XML Output and Saving the Sample Data
    1 You may have observed that In the current version of the BI Publisher, you can preview the XML data for the data model.
    Click the XML icon (found at the right top corner of the page), to see the XML output for the data model you defined in previous topic.
    Select All for the number of rows, and click Run to see the XML data output for all the departments:
    ( A portion of the XML data is displayed here in the screen)
    2 .To save this as sample data, click the Open Menu drop-down list icon, and select Save as Sample Data.
    You can see that the sample.xml is listed in the Sample Data section of the Data Model ( as shown below):
    Note: It is very important to save sample data for a data model, else when creating Layouts, the previews do not appear correctly.
    http://st-curriculum.oracle.com/obe/fmw/bi/bip/bip11g/gettingstarted/gettingstarted.htm
    Assign me some points if helpful.

  • API to print xml data file on a template

    Hi All,
    I want to know if there is any API to print an XML file on a RTF template.
    I have a scenario where a program runs and generates XML file and gives the output in PDF format. Now, i want to use the XML file generated by the program to print on a different template.
    i cannot run the program twice to use subtemplates concept.
    Thanks
    Sam

    Hi,
    See:
    XML data output file in a directory needs to be published as a pdf report
    or
    http://garethroberts.blogspot.com/2007/05/fake-it-masquerade-one-bip-concurrent.html
    Regards,
    Gareth
    Blog: http://garethroberts.blogspot.com/

Maybe you are looking for

  • IMessage is not working in Saudi Arabia

    iMessage is not working in my country (Saudi Arabia) with OS X Mountain Lion   i try to join imessage on my macbook Mountain Lion i did not find my country   Can I get help out there I have just upgraded to Mountain Lion to use i message

  • Another calibration question

    hey all, when calibrating my MacBook battery, once the battery is fully charged and i've let it set for at least two hours with the adapter plugged in, i unplug it and let the battery start to drain. Question: At this point in the process, does it di

  • Acrobat Pro installed on a Windows 2003 32bit server - where's the 64bit driver?

    Hello. I'm still newbie with Acrobat Pro so please bear with me if this is a silly question. A prospect of ours installed the TRIAL version of Acrobat Pro Extended on a 32bit Windows 2003 server and everything went fine; this server "serves" a number

  • Can you tell me where will get the trial version of BW?

    Hi Experts, I am new to bw.  i want to install bw in my home?  could you please guide me how to get trail version? Thanks in advance for your help.

  • Re-installing Elements 10 on a new computer

    I recently bought a new computer running Windows 7. I need to install my copy of Elements 10 on it. As I downloaded it originally I don't have a copy on disc. I do have my registration code. The Adobe site only seems to offer Elements 11 for $79.50 a