How to handle dbms_xmldom with no data values.(no_data_found error in dom)

hi,
i have below block,
DECLARE
doc dbms_xmldom.DOMDocument;
node dbms_xmldom.DOMNode;
elem dbms_xmldom.DOMElement;
cur_node dbms_xmldom.DOMNode;
root_elem_data dbms_xmldom.DOMElement;
root_elem_tab dbms_xmldom.DOMElement;
root_node_data dbms_xmldom.DOMNode;
mode_elmn dbms_xmldom.DOMElement;
mode_node dbms_xmldom.DOMNode;
mode_text dbms_xmldom.DOMText;
doc1 DBMS_XMLDOM.DOMDOCUMENT;
root_node_data1 DBMS_XMLDOM.DOMNODE;
child_document DBMS_XMLDOM.DOMDOCUMENT;
child_rootnode DBMS_XMLDOM.DOMNODE;
V_CLOB CLOB;
v_doc CLOB;
v_EMP CLOB;
v_output_filename VARCHAR2(300) := 'SPOOL_DIR/'||'EMP_XML_FILE.xml';
l_xmltype XMLTYPE;
BEGIN
doc := dbms_xmldom.newDOMDocument;
node := dbms_xmldom.makeNode(doc);
dbms_xmldom.setversion(doc, '1.0');
dbms_xmldom.setCharset(doc, 'UTF8');
elem := dbms_xmldom.createElement(doc, 'PartnerInfo');
dbms_xmldom.setAttribute(elem,'xmlns','EMP');
cur_node := dbms_xmldom.appendChild(node, dbms_xmldom.makeNode(elem));
mode_elmn := dbms_xmldom.createElement(doc, 'EMPLOYEE');
mode_node := dbms_xmldom.appendChild(cur_node,dbms_xmldom.makeNode(mode_elmn));
BEGIN
SELECT value(e) INTO l_xmltype
FROM TABLE(XMLSequence(Cursor(SELECT * FROM EMP1 where EMPNO=7501))) e;
child_document := DBMS_XMLDOM.newDOMDocument(l_xmltype);
root_node_data1 := dbms_xmldom.importNode(doc,dbms_xmldom.makeNode(dbms_xmldom.getDocumentElement(child_document)),TRUE);
root_node_data1 := DBMS_XMLDOM.appendChild(root_node_data, root_node_data1);
EXCEPTION
WHEN OTHERS THEN
Dbms_Output.Put_Line('Error in SELECT stmt(UC_PARTNER_MS):::'||'error::'||SQLERRM);
END;
dbms_lob.createtemporary(v_doc, true);
dbms_xmldom.writeToClob(doc,v_doc,'UTF8');
v_EMP:= v_doc;
dbms_xmldom.writeToFile(DOC,v_output_filename,'UTF8');
dbms_xmldom.freeDocument(doc);
--Dbms_Output.Put_Line('THE OUTPUT IS::'||V_EMP);
EXCEPTION
WHEN OTHERS THEN
Dbms_Output.Put_Line('Error in SELECT stmt(UC_PARTNER_MS):::'||'error::'||SQLERRM);
END;
The xml file is 'EMP_XML_FILE.xml'
<empno>U++kYmcVuGchxbh+++++++++++++++1+</empno>
<empname>J</empname>
suppose the empno 7501 is not available in our emp table,
i got error
ORA-03113: end-of-file on communication channel
how to handle xmldom with no data values.
by
siva

hi,
please give the solution
by
siva

Similar Messages

  • How do I continue with running dates in numbers?

    How do I continue with running dates in numbers?  Using numbers with dates and need to have them autofill across instead of my typing them in manually.

    Hi jonles,
    Type a date then press enter. Click once on that cell and hover the cursor over the right hand side of the cell. This will show the Fill handle (yellow dot). Drag it to the right.
    That will fill by adding a day to each cell.
    To create a series, enter two dates (e.g. 1 Jan then 8 Jan). Select both and drag right to create a weekly series.
    Regards,
    Ian.

  • Column with header data value

    Hi All.
    I have a control file which i need to add a column with header data value.
    example
    data file:
    123456;201303
    santiago;producto1;100
    santiago;producto2;200
    valparais;producto1;400
    valparais;producto3;900
    The control file skip the first column and load the three columns on the table, but, now i need to add other column with 201303 value constant of the first record and load it on the table.
    Then
    select * from table:
    santiago producto1 100 201303
    santiago producto2 200 201303
    valparais producto1 400 201303
    valparais producto3 900 201303
    How i do this in the control file?
    Regards!

    SCOTT@orcl_11gR2> host type test.dat
    123456;201303
    santiago;producto1;100
    santiago;producto2;200
    valparais;producto1;400
    valparais;producto3;900
    SCOTT@orcl_11gR2> host type test1.ctl
    options (load=1)
    load data
    infile test.dat
    replace
    into table onecol_onerow
    fields terminated by ';'
    trailing nullcols
    (filler1 filler, newcol)
    SCOTT@orcl_11gR2> host type test2.ctl
    options (skip=1)
    load data
    infile test.dat
    append
    into table test_tab
    fields terminated by ';'
    trailing nullcols
    (col1, col2, col3,
    newcol expression "(select newcol from onecol_onerow)")
    SCOTT@orcl_11gR2> create table onecol_onerow
      2    (newcol number)
      3  /
    Table created.
    SCOTT@orcl_11gR2> create table test_tab
      2    (col1   varchar2(15),
      3     col2   varchar2(15),
      4     col3   number,
      5     newcol number)
      6  /
    Table created.
    SCOTT@orcl_11gR2> host sqlldr scott/tiger control=test1.ctl log=test1.log
    SQL*Loader: Release 11.2.0.1.0 - Production on Mon May 6 10:46:44 2013
    Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.
    Commit point reached - logical record count 1
    SCOTT@orcl_11gR2> select * from onecol_onerow
      2  /
        NEWCOL
        201303
    1 row selected.
    SCOTT@orcl_11gR2> host sqlldr scott/tiger control=test2.ctl log=test2.log
    SQL*Loader: Release 11.2.0.1.0 - Production on Mon May 6 10:46:45 2013
    Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.
    Commit point reached - logical record count 4
    SCOTT@orcl_11gR2> select * from test_tab
      2  /
    COL1            COL2                  COL3     NEWCOL
    santiago        producto1              100     201303
    santiago        producto2              200     201303
    valparais       producto1              400     201303
    valparais       producto3              900     201303
    4 rows selected.

  • How to avoid the Amount and Date values for VOID Cheques

    Hi All,
    I had created a two window i.e For Amount and Date. If I process the cheque the Amount value and Date should not trigger for VOID CHEQUES.
    Can any one tel me how to avoid the Amount and Date values for VOID Cheques
    Your help will be greatly appreciated.
    Regards
    Yathish

    Hi,
    I dont know which tablel you are referring to, is it PAYR table and the field VOIDR?
    If a cheque is voided, it would have a reason and it is stored in VOIDR field of this PAYR table.
    Check if the field VOIDR is filled, if it is filled, do not print the amount and date.
    Regards
    Subramanian

  • How to retrieve start and end date values from sharepoint 2013

    Hi,
    How to retrieve start and end date values from new event form of calendar in SharePoint foundation2013
    Thanks
    Gowri Balaguru

    Hi Srini
    Yes i need to have parallel flow for both and in the cube where my reporting will be on monthly basis i need to read these 2 master data and get the required attributes ( considering last/first day of that month as per the requirement).......but i am just wondering this is common scenario....while there are so many threads written for populating 0employee from 0person......don't they have such requirement.....
    Thanks
    Tripple k

  • How do I resolve the "insufficient data for image" error for Adobe reader 11.0.04?

    How do I resolve the "insufficient data for image" error for Adobe reader 11.0.04?

    Hi Johnkel1524,
    Please refer : http://helpx.adobe.com/acrobat/kb/insufficient-data-image.html
    Also try updating to 11.0.5 and check.

  • How to use EVS with different data in each row, in a Java Web Dynpro table?

    Hi all,
    I am using EVS in a column of java web dynpro table.
    Let's say the name, and context attribute, of this column is column1.
    It's filled dynamically using an RFC, that uses as input parameter the value of another column, and related context attribute, from the same table (Let's call it column2).  Obviously, from the same row. So, in other words: the values of the EVS in column1 of row1, are dependent of the value of column2 of row1. And the values of the EVS in column1 of row2, are dependent of the value of column2 of row2. And so on... Hope i could explain myself ok.
    The code I'm using works great for filling the EVS dynamically:
    IWDAttributeInfo attrInfo = wdContext.nodeDetail().getNodeInfo().getAttribute(nodeElement.COLUMN1);
    ISimpleTypeModifiable siType = attrInfo.getModifiableSimpleType();
    IModifiableSimpleValueSet<String> value = siType.getSVServices().getModifiableSimpleValueSet();
    value.clear();
    if(this.initRFC_Input(nodeElement.getColumn2())){
         for (int i = 0; i < wdContext.nodeRFCresult().size(); i++){
              value.put(wdContext.nodeRFCresult().getRFCresultElementAt(i).getLgort()
                 , wdContext.nodeRFCresult().getRFCresultElementAt(i).getLgobe());
    In this code, nodeElement is the context row of the table that is passed dynamically to the method when the value of colum2 is changed.
    HOWEVER, the problem I'm having is that after executing this code, EACH NEW ROW that is added to the table has by default the same values as the first row, in the column1 EVS. And, for example, if I refresh the values of the column1 EVS in row 2, all EVS values in the other rows are also refreshed with the same values as the ones of EVS in row 2.
    How can I make sure each row EVS has its own set of independent values, so they don't mess with each other?
    Hope you guys can help me. And please, let me know if I didn't explain myself correctly!
    Thanks!

    I just did as you said (I think), but it's still having the same behaviour as before (same data for all EVS in the table).
    Here´s what I did:
    I
    In node "Detail" (cardinality 0...n, singleton set to true), which is binded to the table, I created a child node named "Column1Values" wth cardinality 1...1 and singleton set to false.
    "Column1Values" node has an attribute called "column1", of type String.
    I did the binding between attribute "column1" and the column1 inputfield celleditor in the table.
    I created an event called Column2Changed and binded it to the column2 celleditor of the table. I added a parameter called nodeElement of type IPrivateCompView.IDetailElement to this event, and mapped it to the column2 editor in the table so that I can dynamically get the nodeElement that is being affected.
    I added the following code to the onActionColumn2Changed(wdEvent, nodeElement) method that gets created in the view:
    IWDAttributeInfo attrInfo = nodeElement.nodeColumn1Values().getNodeInfo().getAttribute("column1");
    ISimpleTypeModifiable siType = attrInfo.getModifiableSimpleType();
    IModifiableSimpleValueSet<String> value = siType.getSVServices().getModifiableSimpleValueSet();
    if(this.initRFC_Input(nodeElement.getColumn2())){
         for(int i =0; i < wdContext.nodeRFCresults().size(); i++){
              value.put(wdContext.nodeRFCresults().getRFCresultsElementAt(i).getId(),
                                  wdContext.nodeRFCresults().getRFCresultsElementAt(i).getDesc());
    And with this, I still get the original problem... When the EVS of one row is updated, ALL other EVS of the table get also updated with the same values.
    What am I missing? Sorry Govardan, I bet I'm not seeing something really obvious... hopefully you can point me in the right direction.
    Thanks!

  • XML data storage - How to handle symbol ' inside xml data from java code

    Hi
    I'm trying to store XML data in Oracle XML DB 10gR2 both through SQL and JAVA .
    I have a simple test table called xmltable with a primary key and a XMLType column
    My sql is:
    insert into xmltable values ('020', sys.XMLType.CreateXML(
    '<?xml version="1.0"?>
    <Mpeg7 xmlns="urn:mpeg:mpeg7:schema:2001">
    <DescriptionMetadata id="2005">
    <LastUpdate>2006-10-19T12:48:22.null+01:00</LastUpdate>
    <Creator/>
    <CreationTime>2006-10-19T12:48:22.null+01:00</CreationTime>
    <Instrument>
    <Tool>
    <Name>LAS MPEG-7 Services v1.0</Name>
    </Tool>
    </Instrument>
    </DescriptionMetadata>
    <Description xsi:type="urn:ContentEntityType" xmlns:urn="urn:mpeg:mpeg7:schema:2001" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <MultimediaContent xsi:type="urn:ImageType">
    <Image id="2005">
    <MediaInformation>
    <MediaProfile>
    <MediaFormat>
    <Content/>
    <Medium href="urn:mpeg:MPEG7MediumCS:2.1.1"/>
    <FileFormat href="urn:mpeg:IPTCMimeTypeCS:image/jpeg"/>
    <FileSize>2782043</FileSize>
    <VisualCoding>
    <Format colorDomain="color" href="urn:mpeg:MPEG7VisualCodingFormatCS:1"/>
    <Frame height="11604" width="8676"/>
    </VisualCoding>
    </MediaFormat>
    </MediaProfile>
    </MediaInformation>
    <MediaLocator>
    <MediaUri>oracle:bosch.informatik.rwth-aachen.de:1521/SMILEY/AMSDB.MEDIA_IMAGE/IMAGE[IMG_ID=2005]</MediaUri>
    </MediaLocator>
    <TextAnnotation>
    <FreeTextAnnotation>B?miy?n and Shikari areas</FreeTextAnnotation>
    </TextAnnotation>
    <Semantic>
    <SemanticBaseRef href="oracle:bosch.informatik.rwth-aachen.de:1521/SMILEY/AMSDB.OBJECT_XML/MPEG7_SB#/mpeg7:Mpeg7/mpeg7:DescriptionMetadata[@id='65']"/>
    <SemanticBaseRef href="oracle:bosch.informatik.rwth-aachen.de:1521/SMILEY/AMSDB.OBJECT_XML/MPEG7_SB#/mpeg7:Mpeg7/mpeg7:DescriptionMetadata[@id='148']"/>
    </Semantic>
    </Image>
    </MultimediaContent>
    </Description>
    </Mpeg7>
    Unfortunately I'm facing problem with the symbol ' at the tags:
    <SemanticBaseRef href="oracle:bosch.informatik.rwth-aachen.de:1521/SMILEY/AMSDB.OBJECT_XML/MPEG7_SB#/mpeg7:Mpeg7/mpeg7:DescriptionMetadata[@id='65']"/>
    <SemanticBaseRef href="oracle:bosch.informatik.rwth-aachen.de:1521/SMILEY/AMSDB.OBJECT_XML/MPEG7_SB#/mpeg7:Mpeg7/mpeg7:DescriptionMetadata[@id='148']"/>
    If I tried with double ' (not '' ) it works with SQL through SQLPLUS but not with java. Indeed I have to store the data through my application
    In java I get java.sql.SQLException: ORA-19102
    Many thanks in advance,
    Evanela

    Thanks for your answer. I downloaded the JDBC AddressBook application and I found it very usefull. I was able to populate a datalist from a datasource and show it in my application. My problem still remains in the sense that I am unable to show the KPI data in a "custom node" meaning I woul like not only to extract directly the database record to a datalist object but also put the information of a single record in a textbok and a gauge and keep control of paging. I think this is done with the parser in the other examples but I can not figure out how to do it with MySQL and the new Desktop screen designer. Should I use a clip object? or is that managed already by the desktop screen designer? or where can I find an example with the functionality I need?.

  • How to handle HTTP-POST encrypted data for ECC Using proxy or RFC

    I have a scenario HTTP-POST ->PI->ECC.sender is HTTP Post  send encrypted data i need to handle the data and stored in to SAP ECC  with out decrypt using PI .what should i take for receiver  can i use inbound proxy or RFC  and how can handle the encrypted data  for decrypt.
    Regards
    Ravi

    1. my sender is HTTP POST . what should i configure in sender communication channel in SAP PI .like SOAP or HTTP .What are the parameters i need to pass .
    >>>
    If you are on PI 7.3 and above, configure the HTTP AAE adapter - Configuring the Java HTTP Adapter on the Sender Channel - Advanced Adapter Engine - SAP Library
    2.while using inbound proxy for encrypted data  i need  store the data in to table , the same proxy can i call  another outbound  service for decrypt  same data.
    >>>>
    Yes you can always a proxy within a proxy.

  • How To Create Table with Static Data

    JDEV 10.1.3
    ADF BC
    ADF Faces
    I am trying to make some simple screen/screenflow diagrams to help flesh out some requirements. To do that, I need to make a table with static data that is not hooked up to a data source (because the data model has not yet been clearly defined, and I'm using the diagrams to help iterate the requirements).
    Is it possible to create a table that shows static data (i.e. a set of rows that does not come from a model data source, but rather is hardcoded.)
    If not, how does one create mock ups without actually implementing the data model?
    Thank you.

    Deepak, what specifically in those 2 links from Amis are useful? Those 2 posts are about bind variables, not static list of values?
    In response to the original poster, I'll attempt to help a little more.
    In the 11g release you can create VOs based on a static list of values. However in your case on 10.1.3, the best method I've found is to create a VO based on a SELECT <columns> FROM DUAL statement. The columns then include your dummy data. If you need more than one row, simply UNION ALL a number of SELECT statements together.
    What I haven't checked, is when you eventually transform the VO based on the SELECT DUAL statement into a VO based on an EO drawing real data from the database, is it an easy process? I recommend you try this out before committing to the approach above. Let us know how you go.
    Regards,
    CM.

  • How to run report with selected data in form?

    Hi,
    Imagine I have a form with a Data block with this inside :
    Code | Name
    1 | Product1
    2 | Product2
    I want to run a report that will only select these 2 records from the table "product".
    I manage to run a report from forms, but it's a pre-defiined report that will always display the same things. (all the table)
    Maybe it's with the paramlist, would you have an exemple or tutorial about that?
    Edit : When I create the report object in the form, I can give the source Data Block, but how to use in the report Data Model?
    Edited by: Danicela on 24 avr. 2009 10:41

    One way to achieve this is to use a "temporary" ID-table.
    Create a table with just two columns RUN_ID and ID
    Then, in forms before starting the report, create a new RUN_ID, e.g. by using a sequence and then, for every record in your block, create a record with the RUN_ID and the record's PK-column-value, in your case this might look like
    RUN_ID  ID
    4711     1
    4711     2Commit that data in Forms (e.g. with using an autonomous transaction).
    Now, pass the RUN_ID as a parameter to the report, and in reports, restrict your query like
    SELECT ..
      FROM YOURTABLE
    WHERE ID IN (SELECT ID
                    FROM ID_TABLE
                   WHERE RUN_ID=:PARAM_RUN_ID
                 )To be clean, delete the data with the run_id in the AFTER-REPORT-trigger of the report.

  • How to trim timestamp from a Date value

    Hi,
    Iam retrieving Date values from database(mysql). When i display these dates in a jsp ,those r displaying like this
    2007-01-01 00:00:00.0
    Actually we dont want that timestamp at the end of the date.
    How can i trim that time stamp from date value.
    We r using Hibernate to interact with database.
    pls give some suggestions regarding this
    thanks

    Hi,
    Iam retrieving Date values from database(mysql).
    When i display these dates in a jsp ,those r
    displaying like this
    2007-01-01 00:00:00.0
    Actually we dont want that timestamp at the end
    of the date.
    How can i trim that time stamp from date value.
    We r using Hibernate to interact with database.
    pls give some suggestions regarding this
    thanksBy display, I assume you mean something like:
    System.out.println(myDate)
    or
    System.out.println(myDate.toString()); // which is the same thingUse SimpleDateFormat class to format the date anyway you like.

  • How Oracle to deal with the data lose?-----QNo.104

    In incomplete recovery,some data will be lost. How Oracle to deal with it?
    For example, at 9:00am, you find that it is a mistake to drop a user(you dropped it at 8:30am). But other users' transactions are in progress. A lot of data is input between 8:30 and 9:00. If decide to make a incomplete recovery, does this means all the data input between 8:30 and 9:00 will be lost?
    Message was edited by:
    frank.qian
    Message was edited by:
    frank.qian

    For example, at 9:00am, you find that it is a mistake to drop a user(you dropped it at 8:30am. But the transactions are in progress. To make you clear, you can't drop the user while session connected to this schema.
    I dont think that you would loose any data.
    The other workaround for this issue would be,
    I would clone this on other server just before the user dropped, take the export and then import the user in the production.
    Is this satisfy your question?
    Jaffar

  • How to create file based on date value

    Hi
    Hope you'll help me. I can't find right way to tackle the problem. I need to read a file which name is created based on month and years' value. File name format is as follows: INMMYY.log. So to read it I must create File object using this file name format. I tried to use Calendar class get necessary information using get() method. Unfortunatelly returned month's value is always 2,3,4 and so on..(I need 02,03). There is problem with year's value als. It's returned in form YYYY but I need YY.
    Does anybody have any idea how to create string INMMYY in the easiest way ??
    Thanks in advance :)

    Use java.text.SimpleDateFormat.

  • How to handle tables having volatile data

    Hi,
    We have a table in which we load millions of data and after validation a huge amount of data is deleted. After that the select statements (performing FTS) becomes slow. If we shrink the space, the queries becomes faster. But shrinking space requires additional time. We can consider creating index on the table. But the indexes will slow down the inserts.
    I wanted to know, how do we handle such tables containing data which has volitile nature.
    The database version is 10.2.0.5 and platform Windows server 2008.
    Regards,

    Thanks Justin,
    We can't truncate the table.
    Basically, the application is for a credit card payment gateway. A credit card transaction may be a successful or unsuccessful transaction. All the data is pushed in flat file. The application loads the data(using SQL loader) in a temporary table and if the merchant_id is correct then the data is pushed in permanent table(say T1). The table T1 may contain successful as well as unsuccessful transations (The unsuccessful transactions have to be maintained for 30 days because of business compulsions). Once the validation is done, the successful transations are moved to different table and are deleted from T1.
    Here I have referred T1 as a table having volatile data. We can't truncate it as it has still data which is required by business.
    Hope I am clear.
    Regards,

Maybe you are looking for

  • Clean install Leopard or Tiger for Final Cut 2 on my g5?

    Hi, I currently have the previous final cut on my g5, on a Tiger operating system. I just got the new Final Cut 2, and I'm going to do a clean install of the OS to have everything running as smooth as possible. Will Leopard speed things up (or slow t

  • Settlement rules in transaction IW31

    Hi gurus, Here is the requirement. After going into transaction IW31, we usually create settlement rules using the separate icon for that on the IW31 screen. Instead of that is it possible to create settlement rules either when we release the order o

  • What really is an ADFContext?

    I am using the ADFContext to get/put some session variables. I spent one whole day behind a problem I have in some circumstances. Apparently, even for session variables, there might be different Contexts according to which point you call ADFContext f

  • Help reinstalling LR on new computer, path to catalog is different.

    I bought a new Windows 8.1 laptop. My previous laptop was Windows 7. I stored my photos under My Pictures with the catalog at the default location. I've moved all my photos to the Pictures folder on the new laptop. So the paths to all the photos is s

  • Why can't I see my calendar in .mac?

    When I go to my .mac account, I cannot open my calendar. Either to see what was syned or simply to enter a new entry. When I click on the icon, it brings me to a generic page. What gives?