Pulling data out of an xml document

i'm sure many of you have had this problem before but i haven't been able to come up with a solution yet. here is the problem:
i am recieving
ERROR at line 1:
ORA-19025: EXTRACTVALUE returns value of only one node
ORA-06512: at line 35
when attempting to use extractvalue because of multiple instances of the same element.
i can build the extractvalue string dynamically but i first need the number of nodes that exist. the xml is in a queue. i tried using the following to get the count but it's not working properly:
SELECT COUNT(*) into lCount
FROM AQ$WS_Q_TABLE a
WHERE existsNode(xmltype(a.USER_DATA.ECMPS_FILE),'/MonitoringPlan/MonitoringLocationData/UnitData/UnitFuelData/UnitFuelIDKey') = 1
and a.MSG_ID = '0861C8ADB0CC018DE040A8C0492A37CB';
it always returns 1.
i'm obviously not constructing the sql properly.
any ideas?
thanks for any help.

right but in order to get all the nodes loaded. i need to find out how many nodes there are.
that's what i'm trying to do with the query i posted but it always returns 1 and i'm not sure why.

Similar Messages

  • Best Practices for pulling data out of Documentum (w/Crystal and Universe)

    I was curious to see if we had any best practices to see if we can pull data out of Documentum.
    Thanks
    Ian S

    None, use what works.

  • Date insertion from large XML document (clob) into relation table very slow

    Hi Everybody!
    I'm working with Oracle 9.2.0.5 on Microsoft Windows Server 2003 Enterprise Edition.
    The server (a test server) is a Pentium 4 2.8 GHz, 1GB of RAM.
    I use a procedure called PARITOP_TRAITERXMLRESULTMASSE to insert the data contained in the pXMLDOC clob parameter in the table pTABLENAME. (You can see the format of the XML document below). The first step on this procedure is to verify that the XML document is not empty. If not, the procedure needs to add a node in the document, in every <ROW> tag. This added node is named “RST_ID”. It’s the foreign key of each record. I can retrieve the value of each <RST_ID> node in an other table in which the data has been previously added (by the calling procedure). When each of the <ROW> elements has been treated, the PARITOP_INSERTXML procedure is called. This procedure uses DBMS_XMLSAVE.INSERTXML to insert the data contained in the XML document in the specified table.
    (Below, you can see the code of my procedures.)
    With this information, can you tell me why this treatment is very very very slow with a large XML document and how I can improve it?
    Thank you for your help!
    Anne-Marie
    CREATE OR REPLACE PROCEDURE "PARITOP_TRAITERXMLRESULTMASSE" (
    pPRC_ID IN PARITOP_PARC.PRC_ID%TYPE,
    pRST_MONDE IN PARITOP_RESULTAT.RST_MONDE%TYPE,
    pXMLDOC IN CLOB,
    pTABLENAME IN VARCHAR2)
    AS
    Objectif :Insérer le contenu du XML passé en paramètre (pXMLDOC) à la table passée en paramètre (pTABLENAME)
    La table passée en paramètre doit être une table ayant comme clé étrangère le champs "RST_ID" .
    (Le noeud RST_ID est donc ajouté à tous les document XML. Ce rst_id est
    déterminé à partir de la table PARITOP_RESULTAT grâce à pPRC_ID et
    pRstMonde fournis en paramètre)
    result_doc CLOB;
    XMLDOMDOC XDB.DBMS_XMLDOM.DOMDOCUMENT;
    NODE_ROWSET DBMS_XMLDOM.DOMNODE;
    NODE_ROW DBMS_XMLDOM.DOMNODE;
    vUE_ID PARITOP_RESULTAT.UE_ID%TYPE;
    vRST_ID PARITOP_RESULTAT.RST_ID%TYPE;
    nodeList DBMS_XMLDOM.DOMNODELIST;
    BEGIN
    BEGIN
    vUE_ID := 0;
    vRST_ID := 0;
    XMLDOMDOC := DBMS_XMLDOM.NEWDOMDOCUMENT(pXMLDOC);
    IF NOT GESTXML_PKG.FN_PARITOP_DOCUMENT_IS_NULL(XMLDOMDOC) THEN
    NODE_ROWSET := DBMS_XMLDOM.item(DBMS_XMLDOM.GETCHILDNODES (DBMS_XMLDOM.MAKENODE(XMLDOMDOC)),0);
    for i in 0..dbms_xmldom.getLength(DBMS_XMLDOM.getchildnodes(NODE_ROWSET))-1 loop
    NODE_ROW := DBMS_XMLDOM.ITEM(DBMS_XMLDOM.GETCHILDNODES(NODE_ROWSET), i) ;
    nodeList := DBMS_XMLDOM.GETELEMENTSBYTAGNAME(DBMS_XMLDOM.makeelement(NODE_ROW) , 'UE_ID');
    IF vUE_ID <> DBMS_XMLDOM.GETNODEVALUE(DBMS_XMLDOM.GETFIRSTCHILD(DBMS_XMLDOM.ITEM(nodeList, 0))) THEN
    vUE_ID := DBMS_XMLDOM.GETNODEVALUE(DBMS_XMLDOM.GETFIRSTCHILD(DBMS_XMLDOM.ITEM(nodeList, 0)));
    --on ramasse le rst_id
    SELECT RST_ID INTO vRST_ID
    FROM PARITOP_RESULTAT RST
    WHERE RST.PRC_ID = pPRC_ID
    AND RST.UE_ID = vUE_ID
    AND RST.RST_MONDE = pRST_MONDE
    AND RST_A_SUPPRIMER = 0;
    END IF;
    GESTXML_PKG.PARITOP_ADDNODETOROW(XMLDOMDOC, NODE_ROW, 'RST_ID', vRST_ID);
    end loop;
    RESULT_DOC := ' '; --à garder, pour ne pas que ca fasse d'erreur lors du WriteToClob.
    dbms_xmldom.writeToClob(DBMS_XMLDOM.MAKENODE(XMLDOMDOC), RESULT_DOC);
    --Insertion du document XML dans la table "tableName"
    GESTXML_PKG.PARITOP_INSERTXML(RESULT_DOC, pTABLENAME);
    DBMS_XMLDOM.FREEDOCUMENT( XMLDOMDOC);
    end if;
    EXCEPTION
    […exception treatement…]
    END;
    END;
    The format of a XML clob is :
    <ROWSET>
    <ROW>
    <PRC_ID>193</PRC_ID>
    <UE_ID>8781</UE_ID>
    <VEN_ID>6223</VEN_ID>
    <RST_MONDE>0</RST_MONDE>
    <CMP_SELMAN>0</CMP_SELMAN>
    <CMP_INDICESELECTION>92.307692307692307</CMP_INDICESELECTION>
    <CMP_PVRES>94900</CMP_PVRES>
    <CMP_PVAJUSTE>72678.017699115066</CMP_PVAJUSTE>
    <CMP_PVAJUSTEMIN>72678.017699115095</CMP_PVAJUSTEMIN>
    <CMP_PVAJUSTEMAX>72678.017699115037</CMP_PVAJUSTEMAX>
    <CMP_PV>148000</CMP_PV>
    <CMP_VALROLE>129400</CMP_VALROLE>
    <CMP_PVRESECART>4790</CMP_PVRESECART>
    <CMP_PVRHAB>101778.01769911509</CMP_PVRHAB>
    <CMP_UTILISE>1</CMP_UTILISE>
    <CMP_TVM>1</CMP_TVM>
    <CMP_PVA>148000</CMP_PVA>
    </ROW>
    <ROW>
    <PRC_ID>193</PRC_ID>
    <UE_ID>8781</UE_ID>
    <VEN_ID>6235</VEN_ID>
    <RST_MONDE>0</RST_MONDE>
    <CMP_SELMAN>0</CMP_SELMAN>
    <CMP_INDICESELECTION>76.92307692307692</CMP_INDICESELECTION>
    <CMP_PVRES>117800</CMP_PVRES>
    <CMP_PVAJUSTE>118080</CMP_PVAJUSTE>
    <CMP_PVAJUSTEMIN>118080</CMP_PVAJUSTEMIN>
    <CMP_PVAJUSTEMAX>118080</CMP_PVAJUSTEMAX>
    <CMP_PV>172000</CMP_PV>
    <CMP_VALROLE>134800</CMP_VALROLE>
    <CMP_PVRESECART>0</CMP_PVRESECART>
    <CMP_PVRHAB>147180</CMP_PVRHAB>
    <CMP_UTILISE>1</CMP_UTILISE>
    <CMP_TVM>1</CMP_TVM>
    <CMP_PVA>172000</CMP_PVA>
    </ROW>
    </ROWSET>
    PARITOP_COMPARABLE TABLE :
    RST_ID NUMBER(10) NOT NULL,
    VEN_ID NUMBER(10) NOT NULL,
    CMP_SELMAN NUMBER(1) NOT NULL,
    CMP_UTILISE NUMBER(1) NOT NULL,
    CMP_INDICESELECTION FLOAT(53) NOT NULL,
    CMP_PVRES FLOAT(53) NULL,
    CMP_PVAJUSTE FLOAT(53) NULL,
    CMP_PVRHAB FLOAT(53) NULL,
    CMP_TVM FLOAT(53) NULL
    ROCEDURE PARITOP_INSERTXML (xmlDoc IN clob, tableName IN VARCHAR2)
    AS
    insCtx DBMS_XMLSave.ctxType;
    rowss number;
    BEGIN
    --permet d'insérer les champs du XML dans la table passée en paramètre.
    --il suffit que les champs XML aient le même nom que les champs de la table
    BEGIN
    insCtx := DBMS_XMLSave.newContext(tableName); -- get context handle
    DBMS_XMLSAVE.SETDATEFORMAT( insCtx, 'yyyy-MM-dd HH:mm:ss');--attention, case sensitive
    DBMS_XMLSAVE.setIgnoreCase(insCtx, 1);
    rowss := DBMS_XMLSAVE.INSERTXML(insCtx , xmlDoc);
    DBMS_XMLSave.closeContext(insCtx);
    EXCEPTION
    […]
    END;
    END;
    PROCEDURE PARITOP_ADDNODETOROW (
    XMLDOMDOC DBMS_XMLDOM.DOMDOCUMENT,
    NODE_ROW dbms_xmldom.DOMNode,
    NOM_NOEUD VARCHAR2,
    VALEUR_NOEUD VARCHAR2)
    AS
    --PERMET D'AJOUTER UN NOEUD AVEC 1 SEULE VALEUR DANS une ROW D'UN XML.
    --UTILE SURTOUT POUR LES CLÉS ÉTRANGÈRES
    domElemAInserer DBMS_XMLDOM.DOMELEMENT;
    NODE dbms_xmldom.DOMNode;
    NODE_TMP dbms_xmldom.DOMNode;
    BEGIN
    domElemAInserer := DBMS_XMLDOM.createElement(XMLDOMDOC, NOM_NOEUD) ;
    NODE := DBMS_XMLDOM.MAKENODE(domElemAInserer); --cast
    NODE := DBMS_XMLDOM.APPENDCHILD(NODE_ROW,NODE);
    NODE_TMP := DBMS_XMLDOM.MAKENODE(DBMS_XMLDOM.CREATETEXTNODE(XMLDOMDOC, VALEUR_NOEUD ) );
    NODE := DBMS_XMLDOM.APPENDCHILD(NODE,NODE_TMP );
    END;

    Hi Everybody!
    I'm working with Oracle 9.2.0.5 on Microsoft Windows Server 2003 Enterprise Edition.
    The server (a test server) is a Pentium 4 2.8 GHz, 1GB of RAM.
    I use a procedure called PARITOP_TRAITERXMLRESULTMASSE to insert the data contained in the pXMLDOC clob parameter in the table pTABLENAME. (You can see the format of the XML document below). The first step on this procedure is to verify that the XML document is not empty. If not, the procedure needs to add a node in the document, in every <ROW> tag. This added node is named “RST_ID”. It’s the foreign key of each record. I can retrieve the value of each <RST_ID> node in an other table in which the data has been previously added (by the calling procedure). When each of the <ROW> elements has been treated, the PARITOP_INSERTXML procedure is called. This procedure uses DBMS_XMLSAVE.INSERTXML to insert the data contained in the XML document in the specified table.
    (Below, you can see the code of my procedures.)
    With this information, can you tell me why this treatment is very very very slow with a large XML document and how I can improve it?
    Thank you for your help!
    Anne-Marie
    CREATE OR REPLACE PROCEDURE "PARITOP_TRAITERXMLRESULTMASSE" (
    pPRC_ID IN PARITOP_PARC.PRC_ID%TYPE,
    pRST_MONDE IN PARITOP_RESULTAT.RST_MONDE%TYPE,
    pXMLDOC IN CLOB,
    pTABLENAME IN VARCHAR2)
    AS
    Objectif :Insérer le contenu du XML passé en paramètre (pXMLDOC) à la table passée en paramètre (pTABLENAME)
    La table passée en paramètre doit être une table ayant comme clé étrangère le champs "RST_ID" .
    (Le noeud RST_ID est donc ajouté à tous les document XML. Ce rst_id est
    déterminé à partir de la table PARITOP_RESULTAT grâce à pPRC_ID et
    pRstMonde fournis en paramètre)
    result_doc CLOB;
    XMLDOMDOC XDB.DBMS_XMLDOM.DOMDOCUMENT;
    NODE_ROWSET DBMS_XMLDOM.DOMNODE;
    NODE_ROW DBMS_XMLDOM.DOMNODE;
    vUE_ID PARITOP_RESULTAT.UE_ID%TYPE;
    vRST_ID PARITOP_RESULTAT.RST_ID%TYPE;
    nodeList DBMS_XMLDOM.DOMNODELIST;
    BEGIN
    BEGIN
    vUE_ID := 0;
    vRST_ID := 0;
    XMLDOMDOC := DBMS_XMLDOM.NEWDOMDOCUMENT(pXMLDOC);
    IF NOT GESTXML_PKG.FN_PARITOP_DOCUMENT_IS_NULL(XMLDOMDOC) THEN
    NODE_ROWSET := DBMS_XMLDOM.item(DBMS_XMLDOM.GETCHILDNODES (DBMS_XMLDOM.MAKENODE(XMLDOMDOC)),0);
    for i in 0..dbms_xmldom.getLength(DBMS_XMLDOM.getchildnodes(NODE_ROWSET))-1 loop
    NODE_ROW := DBMS_XMLDOM.ITEM(DBMS_XMLDOM.GETCHILDNODES(NODE_ROWSET), i) ;
    nodeList := DBMS_XMLDOM.GETELEMENTSBYTAGNAME(DBMS_XMLDOM.makeelement(NODE_ROW) , 'UE_ID');
    IF vUE_ID <> DBMS_XMLDOM.GETNODEVALUE(DBMS_XMLDOM.GETFIRSTCHILD(DBMS_XMLDOM.ITEM(nodeList, 0))) THEN
    vUE_ID := DBMS_XMLDOM.GETNODEVALUE(DBMS_XMLDOM.GETFIRSTCHILD(DBMS_XMLDOM.ITEM(nodeList, 0)));
    --on ramasse le rst_id
    SELECT RST_ID INTO vRST_ID
    FROM PARITOP_RESULTAT RST
    WHERE RST.PRC_ID = pPRC_ID
    AND RST.UE_ID = vUE_ID
    AND RST.RST_MONDE = pRST_MONDE
    AND RST_A_SUPPRIMER = 0;
    END IF;
    GESTXML_PKG.PARITOP_ADDNODETOROW(XMLDOMDOC, NODE_ROW, 'RST_ID', vRST_ID);
    end loop;
    RESULT_DOC := ' '; --à garder, pour ne pas que ca fasse d'erreur lors du WriteToClob.
    dbms_xmldom.writeToClob(DBMS_XMLDOM.MAKENODE(XMLDOMDOC), RESULT_DOC);
    --Insertion du document XML dans la table "tableName"
    GESTXML_PKG.PARITOP_INSERTXML(RESULT_DOC, pTABLENAME);
    DBMS_XMLDOM.FREEDOCUMENT( XMLDOMDOC);
    end if;
    EXCEPTION
    […exception treatement…]
    END;
    END;
    The format of a XML clob is :
    <ROWSET>
    <ROW>
    <PRC_ID>193</PRC_ID>
    <UE_ID>8781</UE_ID>
    <VEN_ID>6223</VEN_ID>
    <RST_MONDE>0</RST_MONDE>
    <CMP_SELMAN>0</CMP_SELMAN>
    <CMP_INDICESELECTION>92.307692307692307</CMP_INDICESELECTION>
    <CMP_PVRES>94900</CMP_PVRES>
    <CMP_PVAJUSTE>72678.017699115066</CMP_PVAJUSTE>
    <CMP_PVAJUSTEMIN>72678.017699115095</CMP_PVAJUSTEMIN>
    <CMP_PVAJUSTEMAX>72678.017699115037</CMP_PVAJUSTEMAX>
    <CMP_PV>148000</CMP_PV>
    <CMP_VALROLE>129400</CMP_VALROLE>
    <CMP_PVRESECART>4790</CMP_PVRESECART>
    <CMP_PVRHAB>101778.01769911509</CMP_PVRHAB>
    <CMP_UTILISE>1</CMP_UTILISE>
    <CMP_TVM>1</CMP_TVM>
    <CMP_PVA>148000</CMP_PVA>
    </ROW>
    <ROW>
    <PRC_ID>193</PRC_ID>
    <UE_ID>8781</UE_ID>
    <VEN_ID>6235</VEN_ID>
    <RST_MONDE>0</RST_MONDE>
    <CMP_SELMAN>0</CMP_SELMAN>
    <CMP_INDICESELECTION>76.92307692307692</CMP_INDICESELECTION>
    <CMP_PVRES>117800</CMP_PVRES>
    <CMP_PVAJUSTE>118080</CMP_PVAJUSTE>
    <CMP_PVAJUSTEMIN>118080</CMP_PVAJUSTEMIN>
    <CMP_PVAJUSTEMAX>118080</CMP_PVAJUSTEMAX>
    <CMP_PV>172000</CMP_PV>
    <CMP_VALROLE>134800</CMP_VALROLE>
    <CMP_PVRESECART>0</CMP_PVRESECART>
    <CMP_PVRHAB>147180</CMP_PVRHAB>
    <CMP_UTILISE>1</CMP_UTILISE>
    <CMP_TVM>1</CMP_TVM>
    <CMP_PVA>172000</CMP_PVA>
    </ROW>
    </ROWSET>
    PARITOP_COMPARABLE TABLE :
    RST_ID NUMBER(10) NOT NULL,
    VEN_ID NUMBER(10) NOT NULL,
    CMP_SELMAN NUMBER(1) NOT NULL,
    CMP_UTILISE NUMBER(1) NOT NULL,
    CMP_INDICESELECTION FLOAT(53) NOT NULL,
    CMP_PVRES FLOAT(53) NULL,
    CMP_PVAJUSTE FLOAT(53) NULL,
    CMP_PVRHAB FLOAT(53) NULL,
    CMP_TVM FLOAT(53) NULL
    ROCEDURE PARITOP_INSERTXML (xmlDoc IN clob, tableName IN VARCHAR2)
    AS
    insCtx DBMS_XMLSave.ctxType;
    rowss number;
    BEGIN
    --permet d'insérer les champs du XML dans la table passée en paramètre.
    --il suffit que les champs XML aient le même nom que les champs de la table
    BEGIN
    insCtx := DBMS_XMLSave.newContext(tableName); -- get context handle
    DBMS_XMLSAVE.SETDATEFORMAT( insCtx, 'yyyy-MM-dd HH:mm:ss');--attention, case sensitive
    DBMS_XMLSAVE.setIgnoreCase(insCtx, 1);
    rowss := DBMS_XMLSAVE.INSERTXML(insCtx , xmlDoc);
    DBMS_XMLSave.closeContext(insCtx);
    EXCEPTION
    […]
    END;
    END;
    PROCEDURE PARITOP_ADDNODETOROW (
    XMLDOMDOC DBMS_XMLDOM.DOMDOCUMENT,
    NODE_ROW dbms_xmldom.DOMNode,
    NOM_NOEUD VARCHAR2,
    VALEUR_NOEUD VARCHAR2)
    AS
    --PERMET D'AJOUTER UN NOEUD AVEC 1 SEULE VALEUR DANS une ROW D'UN XML.
    --UTILE SURTOUT POUR LES CLÉS ÉTRANGÈRES
    domElemAInserer DBMS_XMLDOM.DOMELEMENT;
    NODE dbms_xmldom.DOMNode;
    NODE_TMP dbms_xmldom.DOMNode;
    BEGIN
    domElemAInserer := DBMS_XMLDOM.createElement(XMLDOMDOC, NOM_NOEUD) ;
    NODE := DBMS_XMLDOM.MAKENODE(domElemAInserer); --cast
    NODE := DBMS_XMLDOM.APPENDCHILD(NODE_ROW,NODE);
    NODE_TMP := DBMS_XMLDOM.MAKENODE(DBMS_XMLDOM.CREATETEXTNODE(XMLDOMDOC, VALEUR_NOEUD ) );
    NODE := DBMS_XMLDOM.APPENDCHILD(NODE,NODE_TMP );
    END;

  • Trouble pulling data out of a table

    Ok having problem pulling infromation from a table
    We are trying to add the amount of discount to our line items on our quote (which is a smartform)
    I tried using both sets of code but I can't seem to pull any data from table KONV
    first i tried this
    SELECT SINGLE KNUMV FROM VBAK INTO L_KNUMV WHERE VBELN = is_vbdka-vbeln.
    SELECT * FROM KONV INTO TABLE IT_KONV WHERE KNUMV  =  L_KNUMV AND KPOSN  =  wa_vbdpa-posnr.
    LOOP AT IT_KONV INTO WA_KONV WHERE KWERT NE 0.
    IF WA_KONV-KSCHL = 'ZK04'.
      m_disc =  ( WA_KONV-KWERT * -1 ).
    ENDIF.
    IF WA_KONV-KSCHL = 'ZK07'.
      c_disc = WA_KONV-KWERT.
    ENDIF.
    ENDLOOP.
    item_discount = m_disc + c_disc.
    I get a value for L_KNUMV and KPOSN but it never enters the loop so I thought I'd try to pull it directly with
    SELECT SINGLE KNUMV FROM VBAK INTO L_KNUMV WHERE VBELN = is_vbdka-vbeln.
    select single * from konv into wa_mkonv where knumv = l_knumv and kposn = wa_vbdpa-posnr and kschl = 'zk04'.
    m_disc =  ( wa_mkonv-kwert * -1 ).
    select single * from konv into wa_ckonv where knumv = l_knumv and kposn = wa_vbdpa-posnr and kschl = 'zk07'.
    c_disc = ( wa_ckonv-kwert * -1 ).
    item_disc = m_disc + c_disc.
    But still didn't get any data from KONV
    Is my code wrong or am I trying to pull data from the wrong area.  If i go into table se16  and I place the values in for KNUMV and the KPOSN and can see the information for KONV-KWERT but my smartform isn't pulling it in.

    Israel Edmiston wrote:
    Ok having problem pulling infromation from a table
    >
    > We are trying to add the amount of discount to our line items on our quote (which is a smartform)
    >
    > I tried using both sets of code but I can't seem to pull any data from table KONV
    >
    > first i tried this
    >
    > SELECT SINGLE KNUMV FROM VBAK INTO L_KNUMV WHERE VBELN = is_vbdka-vbeln.
    >
    > SELECT * FROM KONV INTO TABLE IT_KONV WHERE KNUMV  =  L_KNUMV AND KPOSN  =  wa_vbdpa-posnr.
    >
    In Debug Mode check if IT_KONV tab is filled.....
    > LOOP AT IT_KONV INTO WA_KONV WHERE KWERT NE 0.
    >
    > IF WA_KONV-KSCHL = 'ZK04'.
    >   m_disc =  ( WA_KONV-KWERT * -1 ).
    > ENDIF.
    >
    > IF WA_KONV-KSCHL = 'ZK07'.
    >   c_disc = WA_KONV-KWERT.
    > ENDIF.
    >
    > ENDLOOP.
    >
    > item_discount = m_disc + c_disc.
    >
    > I get a value for L_KNUMV and KPOSN but it never enters the loop so I thought I'd try to pull it directly with
    >
    > SELECT SINGLE KNUMV FROM VBAK INTO L_KNUMV WHERE VBELN = is_vbdka-vbeln.
    >
    > select single * from konv into wa_mkonv where knumv = l_knumv and kposn = wa_vbdpa-posnr and kschl = 'zk04'.->
    'ZK04'
    >
    > m_disc =  ( wa_mkonv-kwert * -1 ).
    >
    > select single * from konv into wa_ckonv where knumv = l_knumv and kposn = wa_vbdpa-posnr and kschl = 'zk07' ->
    *'ZK07'*
    >
    > c_disc = ( wa_ckonv-kwert * -1 ).
    >
    > item_disc = m_disc + c_disc.
    >
    >
    > But still didn't get any data from KONV
    >
    > Is my code wrong or am I trying to pull data from the wrong area.  If i go into table se16  and I place the values in for KNUMV and the KPOSN and can see the information for KONV-KWERT but my smartform isn't pulling it in.

  • How to pull data out of a text field?

    How could I accomplish the following.?
    Current data in the column.
    PREOPERATIVE DIAGNOSES:   1.  Right shoulder rotator cuff tear.   2.  Right shoulder biceps tendon disease with superior labral tearing.      POSTOPERATIVE DIAGNOSES:   1.  Right shoulder rotator cuff tear.   2.  Right shoulder biceps tendon disease with superior labral tearing.      SURGEON:  Jane, Doe, MD      ASSISTANT:  Jane, Doe, PA-C and Bob, Doe MD, orthopedic resident.  The assistance of a physician's assistant was required for limb positioning and placement of anchors.      ANESTHETIC: Interscalene block plus general.      DRAINS:  None.      COUNTS: Sponge and needle count were correct.      MATERIAL FORWARDED TO THE LABORATORY:  None.      OPERATION PERFORMED:   1.  Right shoulder arthroscopic rotator cuff tear.   2.  Right shoulder open subpectoral biceps tenodesis.   3.  Right shoulder subacromial decompression with acromioplasty.   4.  Right shoulder extensive glenohumeral debridement.   
    I would like the following in MS Excel.  I would like to pull the header out into a separate column.
    Header
    NOTE_TEXT
    PREOPERATIVE DIAGNOSES: 
    1.  Right shoulder rotator cuff tear.  2.  Right shoulder biceps tendon disease with superior labral tearing. 
    POSTOPERATIVE DIAGNOSES:
    1.  Right shoulder rotator cuff tear.  2.  Right shoulder biceps tendon disease with superior labral tearing. 

    The entire field of data is below.  I highlighted the header in Red where the data stopped being accurate.
    5/7/2014
    LINE
    Split_Text
    1
    PREOPERATIVE DIAGNOSES:   1.  Right shoulder rotator cuff tear.   2.  Right shoulder biceps tendon disease with superior labral tearing.      POSTOPERATIVE DIAGNOSES:   1.  Right shoulder rotator cuff tear.   2.  Right shoulder biceps tendon disease with superior labral tearing.      SURGEON:  Bob, Doe  MD      ASSISTANT:  Jane, Doe  PA‑C and Jane, Doe , MD, orthopedic resident.  The assistance of a physician's assistant was required for limb positioning and placement of anchors.      ANESTHETIC:  Interscalene block plus general.      DRAINS:  None.      COUNTS:  Sponge and needle count were correct.      MATERIAL FORWARDED TO THE LABORATORY:  None.      OPERATION PERFORMED:   1.  Right shoulder arthroscopic rotator cuff tear.   2.  Right shoulder open subpectoral biceps tenodesis.   3.  Right shoulder subacromial decompression with acromioplasty.   4.  Right shoulder extensive glenohumeral debridement.      INDICATIONS:  Mr.XXXXX is a 71‑year‑old male with symptomatic right shoulder rotator cuff tear and degenerative tearing of his labrum and biceps tendon symptoms.  His AC joint is asymptomatic.  I had a long conversation with Bob regarding options.  We discussed nonoperative and operative options.  He would like to proceed with surgical intervention.  I explained the risks and this is well documented in my Clinic note.  On the day of surgery, I met with Bob Doe and his wife.  I reviewed the procedure and answered their questions.  They understand and agree to proceed.      OPERATIVE FINDINGS:  Reveal symmetrical range of motion.  The diagnostic arthroscopy reveals degenerative tearing of the anterior superior and posterior superior labrum.  There was thickening of the biceps tendon.  Minimal fibrillation of the superior subscapularis.  The subscapularis is intact.  There was high grade partial‑thickness tearing of the entire
    2
    supraspinatus and anterior infraspinatus.  The more posterior rotator cuff was normal.  There is chondral thinning of the articular cartilage of the humeral head and glenoid, but no significant chondral loss.  Within the subacromial space was a significant anterior spur off the acromion.      IMPLANTS:  Arthrex 4.5 mm PEEK corkscrew anchor x2, Arthrex 4.75 mm BioComposite SwiveLock x2.      DESCRIPTION OF PROCEDURE:  After in ["V12.72","V13.89","V10.05"] was counseled and plans, alternatives and risks were discussed, consent was obtained.  The correct operative extremity was marked in the preoperative holding area and preoperative antibiotics were administered.  An interscalene block anesthetic was administered without difficulty.  The patient was brought back to the operating suite and administered a general anesthetic.  The examination under anesthesia was performed and the findings are noted above.  The patient was placed in the beach chair position with bony prominences well padded.  The right upper extremity was prepped and draped in the usual sterile fashion.  A timeout process was completed.  A standard posterior arthroscopy portal was created followed by an anterior portal for the working instruments.  A thorough diagnostic arthroscopy was undertaken and the findings are noted above.  Attention was now turned to the extensive glenohumeral debridement.  The motorized resector was used to debride the frayed labrum anteriorly, superiorly and posteriorly.  The biceps tendon was transected.  The stump of the biceps tendon was debrided back to a stable margin.  The arthroscopic instruments were removed.      A 3‑4 cm incision was made in the mid axillary fold.  Hemostasis was obtained with electrocautery.  Dissection was carried down to the pectoralis major fascia, which was opened bluntly, exposing the underlying bicipital groove.  The long head of the biceps tendon was retrieved.  A #2
    3
    FiberWire was placed in the tendon 2 cm away from the musculotendinous junction.  A Cobb was used to remove soft tissue from the bicipital groove.  A 7 mm unicortical socket was placed in the shaft of the humerus.  The long head of the biceps tendon was placed within this socket and held in position with a 6.25 mm BioComposite SwiveLock achieving excellent purchase.  The sutures from the tendon and implant were tied together.      The arthroscope was reinserted into the subacromial space.  A standard lateral portal was created.  A thorough bursectomy was undertaken.  Motorized resector was now used to debride and freshen the end of the torn rotator cuff.  A combination of a motorized resector and ring curet were used to abrade the greater tuberosity.  A second lateral portal was created.  A 4.5 mm PEEK corkscrew anchor was placed in the posterior aspect of the tear 5 mm away from the articular cartilage.  All 4 of these sutures were brought up through the rotator cuff in a mattress fashion.  A second anchor was now placed in the anterior aspect of the cuff tear.  One set of sutures was brought through the cuff in a mattress fashion and the far anterior set was brought to the far anterior aspect of the supraspinatus tear as a simple suture construct.  This knot was tied.  The remaining sutures were tied as mattress sutures.  One limb of suture from each set was then positioned into a 4.75 mm BioComposite SwiveLock and impacted 1 cm lateral to the greater tuberosity creating an excellent double‑row suture bridge equivalent repair.  This was repeated with a second BioComposite SwiveLock and the remaining 3 sutures more anteriorly.  The tear was then inspected.  Range of motion revealed no gapping.      Attention was now turned to the acromioplasty.  The CA ligament was recessed off the anterior acromion with the radiofrequency device.  A bur was then used to flatten the anterior acromion.  Bone was removed until
    1
    5/7/2014
    PAT_NAME
    LINE
    Split_Text
    DAMROW,NEIL ARTHUR
    4
    the acromion was flat from posterior to anterior.  Bony debris was then removed and the subacromial space was copiously lavaged.  The arthroscopic instruments were removed.  Portal sites were closed with nylon.  The anterior incision was closed with 2‑0 Vicryl and Monocryl.  Sterile dressing was applied followed by a shoulder immobilizer.  The patient was extubated on the operating table and taken to the recovery room in good condition.  He tolerated the procedure well and there were no complications.  Estimated blood loss was minimal.      DISPOSITION:  The patient will be discharged home through Same Day Surgery per protocol.  He may remove his dressing on postoperative day #3 and shower and redressing incisions with Band‑Aids and gauze.  He will wear a sling for 6 weeks.  He may start some very gentle closed chain range of motion exercises in the next 7‑10 days with physical therapy at the Clinic.  The patient will follow up with me on postoperative day #12 at  for suture removal.  He was given oxycodone, MS Contin and Vistaril for postoperative pain.  He may have a refill of oxycodone or Vicodin in the first month postoperatively.         Jane,Doe, MD             D: 08/09/2013 12:51   T: 08/09/2013 13:37   MT: ag      Name:     DAMROW, NEIL   MRN:      0000‑00‑00‑00        Account:        0   DOB:      07/01/1942           Procedure Date: 08/09/2013      Document: E4204056
    2

  • Formula to pull data out of one record

    Post Author: ralph.devlin
    CA Forum: Formula
    I am looking at writing a formula that would read one numeric field and then look for that number in a different field in the database and when it finds it, it would then read another field and return that back to the report, IE WO_NUM is read and it is looking for that number in PARENTWOID once it finds it, it returns the RESPONS field of that record. Also there may be multiple records with the same number in the PARENTWOID field. I will need to retrieve all of them that exist, so I was thinking a loop may need to be entered as well to keep doing it until it has found all of them, etc and then return them to the report, I may also need some formating added so they are spaced out evenly, etc.
    thanks
    Ralph

    Post Author: ralph.devlin
    CA Forum: Formula
    Thanks, since we may multiple matches, does a "loop" statement need to be added?
    I just tried that statement but it says I need to enter a number range with my second field after the IN statement

  • How do I create individual xml files from the parsed data output of a xml file?

    I have written a program (DOM Parser) that parses data from a XMl File. I would like to create an individual file with the corresponding name for each set of data parsed from the xml document. If the parsed output is Single, Double, Triple, I would like to create an individual xml file (Single.xml, Double.xml, Triple.xml)with those corresponding names. How do I create the xml files and give each file the name of my parsed data output? Thanks in advance for your help.
    import java.io.IOException;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.parsers.ParserConfigurationException;
    import org.w3c.dom.Document;
    import org.w3c.dom.Element;
    import org.w3c.dom.Node;
    import org.w3c.dom.NodeList;
    import org.xml.sax.SAXException;
    public class MyDomParser {
      public static void main(String[] args) {
      DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
      try {
      DocumentBuilder builder = factory.newDocumentBuilder();
      Document doc = builder.parse("ENtemplate.xml");
      doc.normalize();
      NodeList rootNodes = doc.getElementsByTagName("templates");
      Node rootNode = rootNodes.item(0);
      Element rootElement = (Element) rootNode;
      NodeList templateList = rootElement.getElementsByTagName("template");
      for(int i=0; i < templateList.getLength(); i++) {
      Node theTemplate = templateList.item(i);
      Element templateElement = (Element) theTemplate;
      System.out.println("Template" + ": " +templateElement.getAttribute("name")+ ".xml");
      } catch (ParserConfigurationException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
      } catch (SAXException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
      } catch (IOException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();

    Ive posted the new code but now I'm getting a FileAlreadyExistException error. How do I handle this exception error correctly in my code?
    import java.io.IOException;
    import java.nio.file.FileAlreadyExistsException;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.parsers.ParserConfigurationException;
    import org.w3c.dom.Document;
    import org.w3c.dom.Element;
    import org.w3c.dom.Node;
    import org.w3c.dom.NodeList;
    import org.xml.sax.SAXException;
    public class MyDomParser {
      public static void main(String[] args) {
      DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
      try {
      DocumentBuilder builder = factory.newDocumentBuilder();
      Document doc = builder.parse("ENtemplate.xml");
      doc.normalize();
      NodeList rootNodes = doc.getElementsByTagName("templates");
      Node rootNode = rootNodes.item(0);
      Element rootElement = (Element) rootNode;
      NodeList templateList = rootElement.getElementsByTagName("template");
      for(int i=0; i < templateList.getLength(); i++) {
      Node theTemplate = templateList.item(i);
      Element templateElement = (Element) theTemplate;
      System.out.println(templateElement.getAttribute("name")+ ".xml");
      for(int i=0; i < templateList.getLength(); i++) {
      Node theTemplate = templateList.item(i);
      Element templateElement = (Element) theTemplate;
      String fileName = templateElement.getAttribute("name") + ".xml";
      Files.createFile(Paths.get(fileName));
      System.out.println("File" + ":" + fileName + ".xml created");
      } catch (ParserConfigurationException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
      } catch (SAXException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
      } catch (IOException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();

  • XML Document Generation

    Dear All
    I have a requirement to generate xml document from database as per given XML schema definition. I did this by using oracle report developer to generate out put as xml document.
    My question is that is there any sequence important for attribute for example
    XSD has attribute
    Name
    Address
    phoneno
    But When i generate xml document using oracle report developer it changes the sequence of attributes like this
    phoneno
    address
    name
    please guide that this wrong sequence of attribute have any problem when validating xml document with xsd.
    Regards

    XML 1.0 specifications :
    http://www.w3.org/TR/REC-xml/#sec-starttags
    The Name in the start- and end-tags gives the element's type. [Definition: The Name-AttValue pairs are referred to as the attribute specifications of the element], [Definition: with the Name in each pair referred to as the attribute name ] and [Definition: the content of the AttValue (the text between the ' or " delimiters) as the attribute value.] Note that the order of attribute specifications in a start-tag or empty-element tag is not significant.

  • Pulling info out of service

    I found a quick cfc for creating a service in CF8:
    <cfcomponent>
    <cffunction name="sayHello" access="remote" hint="I say
    hi!" returntype="string">
    <cfargument name="to" hint="Whom to say hi to."
    required="false" default="world" type="string" />
    <cfreturn "Hello, #arguments.to#" />
    </cffunction>
    </cfcomponent>
    After I view the page (
    http://localhost:8500/TestingCF/service2.cfc?wsdl) it shows
    up with xml tags.
    My question is how do I pull info out of the xml tags into a
    user friendly view?

    what sort of 'user-friendly view' are you talking about?
    you want to present the ws structure details to the user?
    or you want the user to enter a name and receive "Hello,
    [name]!"
    response on the page?
    Azadi Saryev
    Sabai-dee.com
    http://www.sabai-dee.com/

  • Using Microsoft SSIS to pull data from APEX

    Just curious...is it possible to pull data out of APEX using SSIS? Has anyone done it? How do I establish the connection?

    You would pull data out of an Oracle database, APEX is just the development tool like .nyet and Forms... What exactly are you looking to do?
    Thank you,
    Tony Miller
    Webster, TX
    You can get more with a kind word and a two-by-four than you can with just a kind word
    If this question is answered, please mark the thread as closed and assign points where earned..

  • Extracting Data Out of BW

    Hi,
    I'm researching what other companies are doing with regards to extracting data out of your BW data warehouse.
    Do you allow data to be extracted out of BW?
    If so, do you push data out to them?  Or do the external systems pull the data out?
    There's no right answer here.  I'm just trying to get a feel for best practices as to whether external clients should pull data out or have it pushed to them.
    By PUSH, I mean that BW initates the data extraction.  And by PULL, I mean that external systems initiate the data extraction.
    THANKS!

    Hi,
    Does anybody know that is it possible created an infospoke on a multicube/multiprovider?
    When creating a infospoke you can only choose between
    Datasource types: Basicube, Infobject (x2) & ODS, if you choose Basicube option and then do the f4 dropdown  the drop down does not contain a list  of Multiprovisers.
    However if you type the name of the multiprovider straight into the field the system will accept it, and the spoke will activate.
    I have tried to execute the spoke and it does generate a few data packets before  erroring. I am unclear if the error is because the spoke is based on a Multiprovider or a different issue. Error message provided below:
    System error: RSDRC / FORM AUTHORITY_CHECK RSDRC / FORM AUTHORITY_CHECK R
    System error: RSDRC / FUNC RSDRC_BASIC_CUBE_DATA_GET RSDRC / FUNC RSDRC_B
    System error: RSDRC / FORM DATA_GET RSDRC / FORM DATA_GET RSDRC / FORM DA
    Thanks
    Tony

  • Search xml document by example

    Hi.
    I'd like to create a XML documents search engine. So id like to find documents that contain elements and data like in request XML document. F.E.
    there are 3 documents in the database
    #1
    <root>
    <firstname>AAA</firstname>
    <lastname>BBB</lastname>
    <nickname>CCC</nickname>
    </root>
    #2
    <root>
    <firstname>AAA</firstname>
    <lastname>DDD</lastname>
    <nickname>EEE</nickname>
    </root>
    #3
    <root>
    <firstname>FFF</firstname>
    <lastname>BBB</lastname>
    <nickname>GGG</nickname>
    </root>
    and a request xml like
    #1
    <root>
    <firstname>AAA</firstname>
    </root>
    #2
    <root>
    <lastname>BBB</lastname>
    </root>
    So, id like to get #1 and #2 documents after request #1 and #1 and #3 after request #2. If there is no <someelement> in request this mean that it's value may be ANY, and if it's empty - this element in document must be empty too.
    So, the question is:
    Is there any simple query for this or I should generate dynamic XPath query for each request?
    Thanks.

    there are different ways to parse through a xml file. you can use a SAXParser for example.
    http://java.sun.com/j2se/1.4.2/docs/api/javax/xml/parsers/SAXParser.html
    you can find heaps of examples for that...
    http://www.brics.dk/~amoeller/XML/programming/saxexample.html

  • Last Row not added to XML Document

    Hi,
    I've created a transaction extracting data from SAP, trying to convert the data into a MII XML Document. But when i try to add the rows with the repeater block, it does not include the last record from the extracted SAP data.
    Description of the transaction:
    SAP function call
    MII XML Document
    Repeater (repeats on all items in the SAP output)
    ->MII XML Row
    ->Assign data to MII XML Row
    Assing XML Document to Transaction output property
    I have inserted a logger at the assignment action block, and the last SAP record is treated by the repeater block, but when i do a count on the SAP item elements and the converted Rows in the MII XML Document there is missing one record..
    Has any body had a similar problem and solved it some how??
    BR
    Jens

    Hi
    I think it is something to do with the technique you are using to add the rows.
    What you are doing is adding a blank row to the document, then populating the row action block (NOT the row in the document) with the first row from your repeater.
    You then run the row action block the second time, it has the data from the first repeater row, and then you populate the row action block with the second repeater row.
    So at the end you will have a rowset with 1 empty row and all but the last populated row from your repeater, plus a Row action populated with the last row from the repeater, but not added to your document.
    What you can do is either - move all your assignments into the Row object (definitely recommend this), or append the final row object to the document rowset before you assign it to your output.
    Hope this makes sense!
    Nick

  • Xpath and Get XML Document Data

    Good Morning,
    I have just recently gotten involved in a project that requires communicating with some web services (axis2). We have existing scripts that handle this already, but they were built when we weren't on axis2 so now the XML output from the web service call is slightly different and i am no longer able to use the same xpath statement in the Get XML Document Data step.
    I am receiving either null values or a prefix namespace error. I am new to xpath and have been reading as best i can from http://www.w3schools.com/xpath/ to try and understand how to write my statements to pull out the data i want correctly.
    I have read that sometimes the editor has problems if the XML contains namespace declarations, etc.
    Below is an example XML output where I'd like to be able to read the value in the ax211:success. My xpath gets prefix namespace errors as it doesn't recognize ax211.
    Xpath: /descendant::ns:validateCertificationResponse/child::ns:return/child::ax211:success
    Perhaps my xpath statement is just incorrect and wouldn't retrieve what i expect it to....
    Any advice is appreciated.
    Thanks,
    Kevin

    Hi,
    well, it appears that text() is automatically appended to the XPath query for some reason in UCCX, this is why you actually see the text node within the ax211:success element. This //*[local-name()="success"] select the whole node, not its first child (which is actually the first element, which also happens to be a text).
    Anyway,
    // - anywhere
    * - any node
    And within this "everything" you actually search with the condition within the angular brackets.
    G.

  • Fastest way to extract data out of xml with following constraints.

    10.2 on linux
    xml files are being dropped off into a queue. in the queue the documents must be stored as clobs so that control can be given back to the client as soon as possible.
    once in the queue we would like to extract all the data from the xml and place it in relational staging tables. the data is then moved from these tables into production.
    the only thing that can change is what happens between the queue and the staging tables. currently i am just using extract statements to pull the data out of the clob.
    the files are around 20mb and currently take over 20 minutes to process which is way too long.
    i looked at DBMS_XMLSTORE but we cannot alter the xml format.
    i looked at Oracle text but if i understand it correctly, we would have to rebuild the entire index after every new queue item.
    i have very little experience with xml so i want to make sure i know all my options.
    from what i can tell my only option is to take the clob and let xml db parse it into o-r tables. ...but even that seems like a horrible waste.
    is there anything else i can do? any pointers?
    thanks for any help!
    by the way...this forum has been of great help. my only problem is that i don't seem to ask the right questions at the right time.

    Chris
    Most people seem to find that allow XML DB to persist the XML using the object based storage and nested tables and then using insert as select operations is the most effective way to do what you want. There are a number of threads on how to best do this..
    The question to ask is do you really need the relational staging tables. If you read through the forum you'll see that once the XML has been persisted as objects, and the XML objects have been stored using a nested table storage models you can easily create relational views to represent the staging tables.
    This process will work very well if there are no updates to the staging tables. Effectively you will process the XML once, when you insert into the Schema based tables, and then use the relational views as the source for the migration from staging to production.
    If you haven't already done so, reading the following posts will help you with this
    XMLType column based on XML Schema: several questions
    http://forums.oracle.com/forums/thread.jspa?threadID=347820&tstart=0
    problem with sql/xml
    XML Query Performance on Nested Tables
    Basically you'll need an XML Schema that describes your XML and you'll need to set up nested table storage for each of the collections in your XML Schema in order to the required performance when using the views.
    The easiest way will be to use the default table that is creted when registering the XML Schema and the annotation xdb:storeVarrayAsTable="true" and then ensure that you sequence each collection correctly.

Maybe you are looking for