ORA-19279: XPTY0004 - XQuery dynamic type mismatch: expected singleton sequence - got multi-item sequence

Hi ,
I executed the below query in database version 11.2.0.3.0, it throws the error like "ORA-19279: XPTY0004 - XQuery dynamic type mismatch: expected singleton sequence - got multi-item sequence"
with PAYMENT_XML as (
      select XMLTYPE(
        '<Document>
        <pain.002.001.02>
            <GrpHdr>
                  <MsgId>CITIBANK/20091204-PSR/4274</MsgId>
                  <CreDtTm>2009-12-04T09:36:00</CreDtTm>
           </GrpHdr>
            <OrgnlGrpInfAndSts>
            <OrgnlMsgId>10002</OrgnlMsgId>
            <OrgnlMsgNmId>pain.001.001.02</OrgnlMsgNmId>
            <OrgnlNbOfTxs>20</OrgnlNbOfTxs>
            <OrgnlCtrlSum>7000</OrgnlCtrlSum>
            <GrpSts>PART</GrpSts>
            <StsRsnInf>
              <AddtlStsRsnInf>ACK - FILE PARTIALLY SUCCESSFUL</AddtlStsRsnInf>
            </StsRsnInf>
          </OrgnlGrpInfAndSts>
          <OrgnlGrpInfAndSts>
            <OrgnlMsgId>10001</OrgnlMsgId>
            <OrgnlMsgNmId>pain.001.001.02</OrgnlMsgNmId>
            <OrgnlNbOfTxs>202</OrgnlNbOfTxs>
            <OrgnlCtrlSum>9000</OrgnlCtrlSum>
            <GrpSts>PART</GrpSts>
            <StsRsnInf>
              <AddtlStsRsnInf>ACK - FILE PARTIALLY SUCCESSFUL</AddtlStsRsnInf>
              <AddtlStsRsnInf>Formated</AddtlStsRsnInf>
            </StsRsnInf>
          </OrgnlGrpInfAndSts>
      </pain.002.001.02>
  </Document>') as OBJECT_VALUE1
   from dual
  select R.*
  from PAYMENT_XML,
       XMLTABLE(
       'for $COMP in $COMPANY/Document/pain.002.001.02
          for $DEPT at $DEPTIDX in $COMP/OrgnlGrpInfAndSts
           return <RESULT>
                    <NAME>{fn:data($COMP/GrpHdr/MsgId)}</NAME>
                      $DEPT/OrgnlMsgId,
                      $DEPT/OrgnlNbOfTxs,
                      $DEPT/OrgnlCtrlSum,
                      $DEPT/GrpSts,
                      $DEPT/StsRsnInf/AddtlStsRsnInf
                  </RESULT>'
       passing OBJECT_VALUE1 as "COMPANY"
       columns
         NAME            VARCHAR(10)  path 'NAME',
         OrgnlMsgId      VARCHAR2(24) path 'OrgnlMsgId',
         ORGNLNBOFTXS    VARCHAR2(24) path 'OrgnlNbOfTxs',
         ORGNLCTRLSUM    NUMBER       path 'OrgnlCtrlSum',
         GRPSTS          VARCHAR2(24) path 'GrpSts',
         ADDTLSTSRSNINF  VARCHAR2(40) path 'AddtlStsRsnInf'
     ) r
Errors comes this part :
            <StsRsnInf>
              <AddtlStsRsnInf>ACK - FILE PARTIALLY SUCCESSFUL</AddtlStsRsnInf>
              <AddtlStsRsnInf>Formated</AddtlStsRsnInf>
            </StsRsnInf>
if i put the single statement for this xml element <AddtlStsRsnInf> it works fine if more than one element comes it raised the error.
i want the output like the below format : want to merge the element value with (, comma)  delimiter with single coloumn value
NAME
ORGNLMSGID
ORGNLNBOFTXS
ORGNLCTRLSUM
GRPSTS
ADDTLSTSRSNINF
CITIBANK/2
10002
20
7,000
PART
ACK - FILE PARTIALLY SUCCESSFUL
CITIBANK/2
10001
202
9,000
PART
ACK - FILE PARTIALLY SUCCESSFUL, Formated
Thanks is advance for reply
Thanks,
Chidam

Try with XQuery string-join() function :
ADDTLSTSRSNINF  VARCHAR2(40) path 'string-join(AddtlStsRsnInf, ", ")'

Similar Messages

  • How can I fix a xquery resulting error ORA-19279: XPTY0004 - XQuery dynamic type mismatch: expected singleton sequence  - got multi-item sequence

    Hello,
    How can I improve the XQuery below in order to obtain a minimised return to escape from both errors ORA-19279 and ORA-01706?
    XQUERY for $book in  fn:collection("oradb:/HR/TB_XML")//article let $cont := $book/bdy  where  $cont   [ora:contains(text(), "(near((The,power,Love),10, TRUE))") > 0] return $book
    ERROR:
    ORA-19279: XPTY0004 - XQuery dynamic type mismatch: expected singleton sequence
    - got multi-item sequence
    XQUERY for $book in  fn:collection("oradb:/HR/TB_XML")//article let $cont := $book/bdy  where  $cont   [ora:contains(., "(near((The,power,Love),10, TRUE))") > 0] return $book//bdy
    /*ERROR:
    ORA-01706: user function result value was too large
    Regards,
    Daiane

    below query works for 1 iteration . but for multiple sets i am getting following error .
    When you want to present repeating groups in relational format, you have to extract the sequence of items in the main XQuery expression.
    Each item is then passed to the COLUMNS clause to be further shredded into columns.
    This should work as expected :
    select x.*
    from abc t
       , xmltable(
           xmlnamespaces(
             default 'urn:swift:xsd:fin.970.2011'
           , 'urn:swift:xsd:mtmsg.2011' as "ns0"
         , '/ns0:FinMessage/ns0:Block4/Document/MT970/F61a/F61'
           passing t.col1
           columns F61ValueDate                Varchar(40) Path 'ValueDate'
                 , DebitCreditMark             Varchar(40) Path 'DebitCreditMark'
                 , Amount                      Varchar(40) Path 'Amount'
                 , TransactionType             Varchar(40) Path 'TransactionType'
                 , IdentificationCode          Varchar(40) Path 'IdentificationCode'                 
                 , ReferenceForTheAccountOwner Varchar(40) Path 'ReferenceForTheAccountOwner'
                 , SupplementaryDetails        Varchar(40) Path 'SupplementaryDetails'       
         ) x ;

  • ORA-19279: XPTY0004 - XQuery dynamic type mismatch: expected singleton sequ

    I have been working with XML files containing only one record. I downloaded instructions to create/insert/select and the statements below work fine for the XML files with one record. Now I have XML files with multiple records/sections, but the select statement returns ORA-19279. How would I change the create/insert/select statements to handle XML files with more than one record? There is still only one vendata section, but there are multiple VendorData sections.
    Thanks.
    1.     Create a table with an XML column:
    create table vendxml_col (
    vend_id number primary key,
    vend_doc XMLType);
    2.     Insert xml document:
    insert into vendxml_col values (1,
    XMLType(bfilename('ING_FEED', 'VenData.xml'),
    nls_charset_id('AL32UTF8')));
    3.     Query the xml columns in vendxml_col:
    select vend_id,
    a.cage, a.repl_cage, a.status, a.company1, a.company2, a.address1, a.address2,
    a.pobox, a.city, a.state, a.zip, a.country, a.phone, a.fax, a.cao, a.adpp,
    a.assoc, a.type, a.affil, a.sizex, a.pri_bus, a.type_bus, a.woman, a.sic,
    a.formerly, a.formerly2, a.comp1key, a.comp2key, a.Revseq, a.Source,
    a.RequestID
    FROM vendxml_col,
    XMLTABLE('/vendata'
    PASSING vendxml_col.vend_doc
    COLUMNS
         cage varchar2(5) PATH '/vendata/VendorData/cage',
         repl_cage varchar2(5) PATH '/vendata/VendorData/repl_cage',
         status varchar2(1) PATH '/vendata/VendorData/status',
         company1 varchar2(30) PATH '/vendata/VendorData/company1',
         company2 varchar2(30) PATH '/vendata/VendorData/company2',
         address1 varchar2(40) PATH '/vendata/VendorData/address1',
         address2 varchar2(40) PATH '/vendata/VendorData/address2',
         pobox varchar2(10) PATH '/vendata/VendorData/pobox',
         city varchar2(30) PATH '/vendata/VendorData/city',
         state varchar2(2) PATH '/vendata/VendorData/state',
         zip varchar2(20) PATH '/vendata/VendorData/zip',
         country varchar2(20) PATH '/vendata/VendorData/country',
         phone varchar2(20) PATH '/vendata/VendorData/phone',
         fax varchar2(20) PATH '/vendata/VendorData/fax',
         cao varchar2(20) PATH '/vendata/VendorData/cao',
         adpp varchar2(20) PATH '/vendata/VendorData/adpp',
         assoc varchar2(20) PATH '/vendata/VendorData/assoc',
         type varchar2(1) PATH '/vendata/VendorData/type',
         affil varchar2(1) PATH '/vendata/VendorData/affil',
         sizex varchar2(1) PATH '/vendata/VendorData/sizex',
         pri_bus varchar2(1) PATH '/vendata/VendorData/pri_bus',
         type_bus varchar2(1) PATH '/vendata/VendorData/type_bus',
         woman varchar2(1) PATH '/vendata/VendorData/woman',
         sic varchar2(4) PATH '/vendata/VendorData/sic',
         formerly varchar2(5) PATH '/vendata/VendorData/formerly',
         formerly2 varchar2(5) PATH '/vendata/VendorData/formerly2',
         comp1key varchar2(30) PATH '/vendata/VendorData/comp1key',
         comp2key varchar2(30) PATH '/vendata/VendorData/comp2key',
         Revseq varchar2(1) PATH '/vendata/VendorData/Revseq',
         Source varchar2(3) PATH '/vendata/VendorData/Source',
         RequestID varchar2(3) PATH '/vendata/VendorData/RequestID'
    ) a
    SQL*Plus: Release 10.2.0.1.0 - Production on Thu Jun 9 13:28:00 2011
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SQL>select * from V$VERSION;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    PL/SQL Release 11.2.0.1.0 - Production
    CORE 11.2.0.1.0 Production
    TNS for Linux: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - Production
    Edited by: user8058903 on Jun 9, 2011 11:28 AM

    Welcome to the XML DB forums.
    As everything in your sample XML is coming from the VendorData node, you can just include that in the XQuery string parm such as shown below. As you didn't include any sample XML, I just built a really simple test case with two VendorData nodes. As the note says, I used WITH to simulate your table/data because I was too lazy to create and populate a table in my playground.
    WITH vendxml_col AS
    (SELECT 1 vend_id,
            XMLTYPE('<vendata><VendorData><cage>c1</cage></VendorData>
            <VendorData><cage>c2</cage></VendorData></vendata>') vend_doc
       FROM dual)
    -- Above WITH used to simulate your table/data.  You only care about below
    SELECT vend_id, a.cage
      FROM vendxml_col,
           XMLTABLE('/vendata/VendorData'
                    PASSING vendxml_col.vend_doc
                    COLUMNS
                    cage    VARCHAR2(5) PATH 'cage') a;
       VEND_ID CAGE
             1 c1
             1 c2

  • ORA-19279: Query dynamic type mismatch: expected singleton sequence

    Hi,
    I have my xml stored in the table 'xml_table’
    The content of XML is a follows:
    <COMPANY NAME="ABC">
    <DEPARTMENT_NAME>Paris</DEPARTMENT_NAME>
    <ADDRESS>Rue de nevers</ADDRESS>
    <DEPARTMENT_NAME>London</DEPARTMENT_NAME>
    <ADDRESS>Northampton Square</ADDRESS>
    </COMPANY>
    I would like to query the xml to get the output like that:
    COMPANY_NAME | DEPARTMENT_NAME | ADDRESS
    ABC | Paris | rue de nevers
    ABC | London | Northampton Square
    However when I execute the query:
    SELECT t.company_name, t.address, t.department_name
    FROM xml_table p,
    XMLTable('/COMPANY' PASSING p.OBJECT_VALUE
    COLUMNS company_name PATH '@NAME',
    address VARCHAR2(100) PATH '/COMPANY/ADDRESS',
    department_name VARCHAR2(100) PATH '/COMPANY/DEPARTMENT_NAME') t
    I am getting error:
    ORA-19279: XPTY0004 - XQuery dynamic type mismatch: expected singleton sequence - got multi-item sequence
    What can be wrong with the query? Howe should it be modified to get desired output?
    Thank for help
    Groxy

    As was mentioned... Enclosing the tags for each department in a DEPARTMENT tag would make this easier and more effiecient but here's an alternative approach if modifying the XML is not an option
    SQL> with COMPANY_XML as
      2  (
      3    select XMLTYPE(
      4  '<COMPANY NAME="ABC">
      5     <DEPARTMENT_NAME>Paris</DEPARTMENT_NAME>
      6     <ADDRESS>Rue de nevers</ADDRESS>
      7     <DEPARTMENT_NAME>London</DEPARTMENT_NAME>
      8     <ADDRESS>Northampton Square</ADDRESS>
      9  </COMPANY>') as OBJECT_VALUE from dual
    10  )
    11  select R.*
    12    from COMPANY_XML,
    13         XMLTABLE
    14         (
    15            'for $COMP in $COMPANY/COMPANY
    16               for $DEPT at $DEPTIDX in $COMP/DEPARTMENT_NAME
    17                 return <RESULT>
    18                         <NAME>{fn:data($COMP/@NAME)}</NAME>
    19                         {
    20                           $COMP/DEPARTMENT_NAME[$DEPTIDX],
    21                           $COMP/ADDRESS[$DEPTIDX]
    22                         }
    23                       </RESULT>'
    24            passing OBJECT_VALUE as "COMPANY"
    25        ) r
    26  /
    COLUMN_VALUE
    <RESULT><NAME>ABC</NAME><DEPARTMENT_NAME>Paris</DEPARTMENT_NAME><ADDRESS>Rue de
    nevers</ADDRESS></RESULT>
    <RESULT><NAME>ABC</NAME><DEPARTMENT_NAME>London</DEPARTMENT_NAME><ADDRESS>Northa
    mpton Square</ADDRESS></RESULT>This above step creates a document for all tags with a particular index and then we can apply a columns cause to get the results..
    SQL>   with COMPANY_XML as
      2  (
      3    select XMLTYPE(
      4  '<COMPANY NAME="ABC">
      5     <DEPARTMENT_NAME>Paris</DEPARTMENT_NAME>
      6     <ADDRESS>Rue de nevers</ADDRESS>
      7     <DEPARTMENT_NAME>London</DEPARTMENT_NAME>
      8     <ADDRESS>Northampton Square</ADDRESS>
      9  </COMPANY>') as OBJECT_VALUE from dual
    10  )
    11  select R.*
    12    from COMPANY_XML,
    13         XMLTABLE
    14         (
    15            'for $COMP in $COMPANY/COMPANY
    16               for $DEPT at $DEPTIDX in $COMP/DEPARTMENT_NAME
    17                 return <RESULT>
    18                         <NAME>{fn:data($COMP/@NAME)}</NAME>
    19                         {
    20                           $COMP/DEPARTMENT_NAME[$DEPTIDX],
    21                           $COMP/ADDRESS[$DEPTIDX]
    22                         }
    23                       </RESULT>'
    24            passing OBJECT_VALUE as "COMPANY"
    25            columns
    26            NAME            VARCHAR(10),
    27            DEPARTMENT_NAME VARCHAR2(24),
    28            ADDRESS         VARCHAR2(24)
    29        ) r
    30  /
    NAME       DEPARTMENT_NAME          ADDRESS
    ABC        Paris                    Rue de nevers
    ABC        London                   Northampton Square
    SQL>

  • XQuery dynamic type mismatch

    Hi all, I am new to xmldb and XQuery. Having trouble with relational xmltable quering... Any help is appriciated.
    I want the following output
    id info loc
    4 stuff2 1
    5 stuff3 1
    6 stuff1 1
    7 stuff4 2
    etc....
    The problem if feel is loc does not have a relation to transaction in the data. But I get an error "XQuery dynamic type mismatch"....
    I have created a basic example below:
    SELECT a.*
    FROM "testTable",
    XMLTABLE('/root/org/transaction'
    PASSING testTable.column
    COLUMNS
    id varchar2(2) PATH '@id',
    info varchar2(50) PATH '/info',
    loc varchar2(2) PATH '@loc'
    ) a
    <root>
    <org loc="1">
    <Transaction id="4"><info>stuff2</info></Transaction>
    <Transaction id="5"><info>stuff3</info></Transaction>
    <Transaction id="6"><info>stuff1</info></Transaction>
    </org>
    <org loc="2">
    <Transaction id="7"><info>stuff4</info></Transaction>
    <Transaction id="8"><info>stuff5</info></Transaction>
    </org>
    <org loc="3">
    <Transaction id="9"><info>stuff6</info></Transaction>
    <Transaction id="10"><info>stuff7</info></Transaction>
    </org>
    </root>
    Thanks again for any help.
    Edited by: user8820504 on Jan 14, 2010 2:27 PM

    You need two distinct tables, one that maps Transactions and one that maps Orgs. Then join them on id. Something like this:
    SQL> with testTable as (
      2  select xmltype('<root>
      3  <org loc="1">
      4  <Transaction id="4"><info>stuff2</info></Transaction>
      5  <Transaction id="5"><info>stuff3</info></Transaction>
      6  <Transaction id="6"><info>stuff1</info></Transaction>
      7  </org>
      8  <org loc="2">
      9  <Transaction id="7"><info>stuff4</info></Transaction>
    10  <Transaction id="8"><info>stuff5</info></Transaction>
    11  </org>
    12  <org loc="3">
    13  <Transaction id="9"><info>stuff6</info></Transaction>
    14  <Transaction id="10"><info>stuff7</info></Transaction>
    15  </org>
    16  </root>') doc
    17  from dual)
    18  SELECT id, info, loc
    19  FROM testTable,
    20       XMLTABLE('/root/org/Transaction'
    21       PASSING testTable.doc
    22       COLUMNS
    23       id varchar2(2) PATH '@id',
    24       info varchar2(50) PATH 'info',
    25       tr xmltype PATH '.'
    26        ) trans ,
    27       XMLTABLE('/root/org'
    28       PASSING testTable.doc
    29       COLUMNS
    30       loc varchar2(2) PATH '@loc',
    31       trs xmltype PATH 'Transaction'
    32        ) orgs
    33  where extractValue(orgs.trs,'/Transaction[@id="'||id||'"]/@id') is not null ;
    ID INFO                                               LO
    4  stuff2                                             1
    5  stuff3                                             1
    6  stuff1                                             1
    7  stuff4                                             2
    8  stuff5                                             2
    9  stuff6                                             3
    10 stuff7                                             3
    Selezionate 7 righe.Max
    [My Italian Oracle blog|http://oracleitalia.wordpress.com/2010/01/10/crittografia-in-plsql-utilizzando-dbms_crypto/]

  • Dynamic link problem, PPro cs5 - AE cs5, multi-cam sequence

    This is odd. I'm working on a two camera interview in Production Premium CS5. Did the standard stuff - a source sequence with both cameras, did some rough editing here (syncing the two cameras, trimming the clips, etc.). Then nested the source sequence into a multi-cam edit sequence. Used the multi-cam monitor to switch back and forth between cameras, etc. All is good.
    But my editor wants to make three separate videos from this interview. So the logical thing (so I thought anyway) would be to nest this muiti-cam edit squence into three separate target sequences. Then I could get the camera switching done just once, and slice-'n-dice the three target sequences to make the short-'n-sweet individual videos that make my editor happy. Did this for the first target (a single question and answer). The result looks fine in PPro, and editor approves. All that's left is adding the lower thirds.
    Everything fine until I go to export to AE via dynamic link so I can add lower thirds and finish up. What PPro sends to AE isn't just my target sequence, but it also sends the multi-cam edit sequence and the source sequence as well. But.... it ignores it all and will only show me the Acam footage. Bcam doesn't show up at all. Clearly this isn't working. But now I find that I can't even break the links. So I can't even start over. Sigh...
    Two questions: First, how does one export a multi-cam edit sequence via dynamic link from PPro to AE, and have it show up in AE looking like it does in PPro? In other words, what did I do wrong?
    Second, how can I recover from this? Do I really have to delete my target sequence in PPro and start over (and by extension, delete the AE project also)? Is there no way to sever a dynamic link once it's made?
    Bruce Watson

    Um.... didn't work. Seems that AE and PPro have different ideas of what "transparency" mean. The lower thirds composition in AE has a transparent (black) background which works fine in AE (I've used this lower thirds quite a bit in AE so I know it works pretty well), but when I import it into PPro it shows as white, and is completely opaque. Lettering doesn't show up either (but the letters are white so that's not such a surprise given the background), but the motion is still there. None-the-less, either way I tried it (copy and paste, or export from AE as a PPro project, then import it in PPro and drag the AE built sequence to the timeline) didn't work.
    Trying to export just the lower third comp from AE through dynamic link as a PPro project didn't work either. Failed weirdly. It popped up the right sequence creation box in PPro, so I could pick AVCHD 1080p30 as the sequence type (matching the other sequences in the project), and created the new sequence with the correct name. But the sequence was empty. It wouldn't let me drag the lower third sequence anywhere either, so I couldn't put it on a timeline.
    Sigh... this isn't supposed to be this difficult. But hey, if it was easy anyone could do it, yes?

  • How to overcome ORA-19279 error

    Hi,
    I have oracle 11.2.2 and following xml is loaded in xmltype table and trying to retrive data and getting following error, please anyone could help me to fix this error
    <?xml version="1.0" encoding="utf-8"?>
    <agents count="1382">
    <agent>
    <name>Nancy Palmer</name>
    <email>[email protected]</email>
    <agentid>MLSL:00525350</agentid>
    <officeid>58</officeid>
    <website>http://www.nancypalmer.com</website>
    <photo>https://sites.e-agents.com/Uploads/68/41/6841/Agents/agent_8418_NANCY_PALMER_COLOR_HEAD_SHOT_HIGH_QUALITY_2011.jpg</photo>
    <phone_direct>6504344313</phone_direct>
    <phone_cell>6504920200</phone_cell>
    <mod_time>2012-08-31T05:15:06.933</mod_time>
    </agent>
    <agent>
    <name>Genella Williamson</name>
    <email>[email protected]</email>
    <agentid>MLSL:00755754</agentid>
    <officeid>58</officeid>
    <website>http://www.apr.com/genella</website>
    <photo>https://sites.e-agents.com/Uploads/68/41/6841/Agents/agent_8426_genella.jpg</photo>
    <phone_direct>6504344319</phone_direct>
    <phone_cell>6507870839</phone_cell>
    <mod_time>2010-10-30T15:15:07.603</mod_time>
    </agent>
    <agent>
    <name>Diana Langley</name>
    <email>[email protected]</email>
    <agentid>MLSL:01256202,SFAR:805608</agentid>
    <officeid>50</officeid>
    <website>http://www.apr.com/DLangley</website>
    <photo>https://sites.e-agents.com/Uploads/68/41/6841/Agents/agent_7848_dlangley.jpg</photo>
    <phone_direct/>
    <phone_cell/>
    <mod_time>2011-06-06T05:15:06.587</mod_time>
    </agent>
    </agents>
    query usered to reterive data
    SELECT count, NAME, email,
           officeid, website,
           photo, phone_direct,
           phone_cell, mod_date
      FROM TEMP_XML tx,
           XMLTable('/agents'
                    PASSING tx.xml_data 
                    columns count        varchar2(30) path '@count',
                            NAME         VARCHAR2(100) path 'agent/name',
                             email        VARCHAR2(100) path 'agent/email',
                             officeid     VARCHAR2(100) path 'agent/officeid',
                             website      VARCHAR2(100) path 'agent/website',
                             photo        VARCHAR2(100) path 'agent/photo',
                             phone_direct      VARCHAR2(100) path 'agent/phone_direct',
                             phone_cell      VARCHAR2(100) path 'agent/phone_cell',
                             mod_date      VARCHAR2(100) path 'agent/mod_date'
    recieved error
    ORA-19279: XPTY0004 - XQuery dynamic type mismatch: expected singleton sequence - got multi-item sequence
    19279. 00000 -  "XQuery dynamic type mismatch: expected singleton sequence - got multi-item sequence"
    *Cause:    The XQuery sequence passed in had more than one item.
    *Action:   Correct the XQuery expression to return a single item sequence.Thanks in advance
    Best Regards,

    use
    SELECT count,
           NAME,
           email,
           officeid,
           website,
           photo,
           phone_direct,
           phone_cell,
           mod_date
      FROM TEMP_XML tx,
           XMLTable('agents' PASSING tx.xml_data
                    columns count varchar2(30) path '@count',
                    xml_part xmltype path '*') x,
           XMLTable('agent' PASSING x.xml_part
                    columns NAME VARCHAR2(100) path 'name',
                    email VARCHAR2(100) path 'email',
                    officeid VARCHAR2(100) path 'officeid',
                    website VARCHAR2(100) path 'website',
                    photo VARCHAR2(100) path 'photo',
                    phone_direct VARCHAR2(100) path 'phone_direct',
                    phone_cell VARCHAR2(100) path 'phone_cell',
                    mod_date VARCHAR2(100) path 'mod_date') y

  • ORA-19279 error extracting one-to-many sequence

    I have an xml table built from a registered schema that I'm trying to extract data from using a view. The lowest level is a polygon with multiple vertices -- vertices number, latitude, and longitude. The xml file lists data as
    POLYGON
    SEQ_NUM
    LAT
    LON
    SEQ_NUM
    LAT
    LON
    SEQ_NUM
    LAT
    LON
    /POLYGON
    The method I use to extract the data returns an ORA-19279 error: "XQuery dymanic type mismatch: expected singleton sequence - got multi-item sequence." The error is pointing to the polygon data; however the polygon sequence tag in the xsd file has the attribute of maxOccurs="unbounded".
    Below is the xsd file, a samlpe xml file and the Select statement I use.
    ABC.xsd file:
    &lt;?xml version="1.0"?&gt;
    &lt;xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
    elementFormDefault="qualified" attributeFormDefault="unqualified"&gt;
    &lt;xs:element name="A_B_C"&gt;
    &lt;xs:complexType&gt;
    &lt;xs:sequence&gt;
    &lt;xs:element name="A"&gt;
    &lt;xs:complexType&gt;
    &lt;xs:sequence&gt;
    &lt;xs:element name="B"&gt;
    &lt;xs:simpleType&gt;
    &lt;xs:restriction base="xs:string"&gt;
    &lt;xs:enumeration value="1A"/&gt;
    &lt;xs:enumeration value="1B"/&gt;
    &lt;xs:enumeration value="2A"/&gt;
    &lt;xs:enumeration value="2B"/&gt;
    &lt;xs:enumeration value="2C"/&gt;
    &lt;/xs:restriction&gt;
    &lt;/xs:simpleType&gt;
    &lt;/xs:element&gt;
    &lt;/xs:sequence&gt;
    &lt;/xs:complexType&gt;
    &lt;/xs:element&gt;
    &lt;xs:choice&gt;
    &lt;xs:element name="D" maxOccurs="unbounded"&gt;
    &lt;xs:complexType&gt;
    &lt;xs:sequence&gt;
    &lt;xs:element name="D_ID" type="xs:string"&gt;
    &lt;/xs:element&gt;
    &lt;xs:element name="D_UQ_ID" type="xs:string"&gt;
    &lt;/xs:element&gt;
    &lt;xs:element name="D_TIME"&gt;
    &lt;xs:simpleType&gt;
    &lt;xs:restriction base="xs:string"/&gt;
    &lt;/xs:simpleType&gt;
    &lt;/xs:element&gt;
    &lt;xs:choice&gt;
    &lt;xs:element name="F"&gt;
    &lt;xs:complexType&gt;
    &lt;xs:sequence&gt;
    &lt;xs:element name="F_TYPE" type="xs:string"&gt;
    &lt;/xs:element&gt;
    &lt;xs:element name="F_SUBTYPE" type="xs:string"&gt;
    &lt;/xs:element&gt;
    &lt;xs:element name="G" minOccurs="0"&gt;
    &lt;xs:complexType&gt;
    &lt;xs:choice&gt;
    &lt;xs:element name="H"&gt;
    &lt;xs:complexType&gt;
    &lt;xs:sequence&gt;
    &lt;xs:element name="H_TYPE" type="xs:string" minOccurs="0"&gt;
    &lt;/xs:element&gt;
    &lt;xs:element name="H_MODE" type="xs:string" minOccurs="0"&gt;
    &lt;/xs:element&gt;
    &lt;xs:element name="H_SHAPE" minOccurs="0"&gt;
    &lt;xs:complexType&gt;
    &lt;xs:choice&gt;
    &lt;xs:element name="POLYGON"&gt;
    &lt;xs:complexType&gt;
    {color:#ff0000}*&lt;xs:sequence maxOccurs="unbounded"&gt;*{color}
    &lt;xs:element name="SEQ_NUM" type="xs:unsignedInt"&gt;
    &lt;xs:annotation&gt;
    &lt;xs:documentation&gt;sequence number in the polygon&lt;/xs:documentation&gt;
    &lt;/xs:annotation&gt;
    &lt;/xs:element&gt;
    &lt;xs:element name="LAT" type="xs:float"/&gt;
    &lt;xs:element name="LON" type="xs:float"/&gt;
    &lt;/xs:sequence&gt;
    &lt;/xs:complexType&gt;
    &lt;/xs:element&gt;
    &lt;xs:element name="CIRCLE"&gt;
    &lt;xs:complexType&gt;
    &lt;xs:sequence&gt;
    &lt;xs:element name="LAT" type="xs:float"/&gt;
    &lt;xs:element name="LON" type="xs:float"/&gt;
    &lt;xs:element name="RAD" type="xs:float"/&gt;
    &lt;/xs:sequence&gt;
    &lt;/xs:complexType&gt;
    &lt;/xs:element&gt;
    &lt;xs:element name="ELLIPSE"&gt;
    &lt;xs:complexType&gt;
    &lt;xs:sequence&gt;
    &lt;xs:element name="ORIENT"&gt;
    &lt;xs:simpleType&gt;
    &lt;xs:restriction base="xs:float"&gt;
    &lt;xs:minInclusive value="0"/&gt;
    &lt;xs:maxInclusive value="360"/&gt;
    &lt;/xs:restriction&gt;
    &lt;/xs:simpleType&gt;
    &lt;/xs:element&gt;
    &lt;xs:element name="MAJ_AX" type="xs:float"&gt;
    &lt;/xs:element&gt;
    &lt;xs:element name="MIN_AX" type="xs:float"&gt;
    &lt;/xs:element&gt;
    &lt;/xs:sequence&gt;
    &lt;/xs:complexType&gt;
    &lt;/xs:element&gt;
    &lt;/xs:choice&gt;
    &lt;/xs:complexType&gt;
    &lt;/xs:element&gt;
    &lt;/xs:sequence&gt;
    &lt;/xs:complexType&gt;
    &lt;/xs:element&gt;
    &lt;/xs:choice&gt;
    &lt;/xs:complexType&gt;
    &lt;/xs:element&gt;
    &lt;/xs:sequence&gt;
    &lt;/xs:complexType&gt;
    &lt;/xs:element&gt;
    &lt;xs:element name="E"&gt;
    &lt;xs:complexType/&gt;
    &lt;/xs:element&gt;
    &lt;/xs:choice&gt;
    &lt;/xs:sequence&gt;
    &lt;/xs:complexType&gt;
    &lt;/xs:element&gt;
    &lt;xs:element name="C"&gt;
    &lt;/xs:element&gt;
    &lt;/xs:choice&gt;
    &lt;/xs:sequence&gt;
    &lt;/xs:complexType&gt;
    &lt;/xs:element&gt;
    &lt;/xs:schema&gt;
    abc.xml file:
    &lt;?xml version="1.0" encoding="utf-8"?&gt;
    &lt;A_B_C&gt;
    &lt;A&gt;
    &lt;B&gt;1B&lt;/B&gt;
    &lt;/A&gt;
    &lt;D&gt;
    &lt;D_ID&gt;D_0001&lt;/D_ID&gt;
    &lt;D_UQ_ID&gt;UQ_D_0001&lt;/D_UQ_ID&gt;
    &lt;D_TIME&gt;2007 FEB 11:11:11.11&lt;/D_TIME&gt;
    &lt;F&gt;
    &lt;F_TYPE&gt;F_TYPE_TEST&lt;/F_TYPE&gt;
    &lt;F_SUBTYPE&gt;SUB_TEST&lt;/F_SUBTYPE&gt;
    &lt;G&gt;
    &lt;H&gt;
    &lt;H_TYPE&gt;Ipod&lt;/H_TYPE&gt;
    &lt;H_MODE&gt;SCANNING&lt;/H_MODE&gt;
    &lt;H_SHAPE&gt;
    &lt;POLYGON&gt;
    &lt;SEQ_NUM&gt;1&lt;/SEQ_NUM&gt;
    &lt;LAT&gt;10.1&lt;/LAT&gt;
    &lt;LON&gt;11.1&lt;/LON&gt;
    &lt;SEQ_NUM&gt;2&lt;/SEQ_NUM&gt;
    &lt;LAT&gt;20.2&lt;/LAT&gt;
    &lt;LON&gt;22.2&lt;/LON&gt;
    &lt;SEQ_NUM&gt;3&lt;/SEQ_NUM&gt;
    &lt;LAT&gt;30.3&lt;/LAT&gt;
    &lt;LON&gt;33.3&lt;/LON&gt;
    &lt;SEQ_NUM&gt;4&lt;/SEQ_NUM&gt;
    &lt;LAT&gt;40.4&lt;/LAT&gt;
    &lt;LON&gt;44.4&lt;/LON&gt;
    &lt;/POLYGON&gt;
    &lt;CIRCLE&gt;
    &lt;LAT&gt;12.3&lt;/LAT&gt;
    &lt;LON&gt;45.6&lt;/LON&gt;
    &lt;RAD&gt;78.9&lt;/RAD&gt;
    &lt;/CIRCLE&gt;
    &lt;ELLIPSE&gt;
    &lt;ORIENT&gt;99.90&lt;/ORIENT&gt;
    &lt;MAJ_AX&gt;111.10&lt;/MAJ_AX&gt;
    &lt;MIN_AX&gt;222.20&lt;/MIN_AX&gt;
    &lt;/ELLIPSE&gt;
    &lt;/H_SHAPE&gt;
    &lt;/H&gt;
    &lt;/G&gt;
    &lt;/F&gt;
    &lt;E&gt;&lt;/E&gt;
    &lt;/D&gt;
    &lt;D&gt;
    &lt;D_ID&gt;D_0002&lt;/D_ID&gt;
    &lt;D_UQ_ID&gt;UQ_D_0002&lt;/D_UQ_ID&gt;
    &lt;D_TIME&gt;2007 FEB 22:22:22.22&lt;/D_TIME&gt;
    &lt;F&gt;
    &lt;F_TYPE&gt;F_TYPE_TEST&lt;/F_TYPE&gt;
    &lt;F_SUBTYPE&gt;SUB_TEST&lt;/F_SUBTYPE&gt;
    &lt;G&gt;
    &lt;H&gt;
    &lt;H_TYPE&gt;Ipod&lt;/H_TYPE&gt;
    &lt;H_MODE&gt;SCANNING&lt;/H_MODE&gt;
    &lt;H_SHAPE&gt;
    &lt;POLYGON&gt;
    &lt;SEQ_NUM&gt;1&lt;/SEQ_NUM&gt;
    &lt;LAT&gt;10.1&lt;/LAT&gt;
    &lt;LON&gt;11.1&lt;/LON&gt;
    &lt;SEQ_NUM&gt;2&lt;/SEQ_NUM&gt;
    &lt;LAT&gt;20.2&lt;/LAT&gt;
    &lt;LON&gt;22.2&lt;/LON&gt;
    &lt;SEQ_NUM&gt;3&lt;/SEQ_NUM&gt;
    &lt;LAT&gt;30.3&lt;/LAT&gt;
    &lt;LON&gt;33.3&lt;/LON&gt;
    &lt;SEQ_NUM&gt;4&lt;/SEQ_NUM&gt;
    &lt;LAT&gt;40.4&lt;/LAT&gt;
    &lt;LON&gt;44.4&lt;/LON&gt;
    &lt;/POLYGON&gt;
    &lt;CIRCLE&gt;
    &lt;LAT&gt;12.3&lt;/LAT&gt;
    &lt;LON&gt;45.6&lt;/LON&gt;
    &lt;RAD&gt;78.9&lt;/RAD&gt;
    &lt;/CIRCLE&gt;
    &lt;ELLIPSE&gt;
    &lt;ORIENT&gt;99.90&lt;/ORIENT&gt;
    &lt;MAJ_AX&gt;111.10&lt;/MAJ_AX&gt;
    &lt;MIN_AX&gt;222.20&lt;/MIN_AX&gt;
    &lt;/ELLIPSE&gt;
    &lt;/H_SHAPE&gt;
    &lt;/H&gt;
    &lt;/G&gt;
    &lt;/F&gt;
    &lt;E&gt;&lt;/E&gt;
    &lt;/D&gt;
    &lt;D&gt;
    &lt;D_ID&gt;D_0003&lt;/D_ID&gt;
    &lt;D_UQ_ID&gt;UQ_D_0003&lt;/D_UQ_ID&gt;
    &lt;D_TIME&gt;2007 FEB 33:33:33.33&lt;/D_TIME&gt;
    &lt;F&gt;
    &lt;F_TYPE&gt;F_TYPE_TEST&lt;/F_TYPE&gt;
    &lt;F_SUBTYPE&gt;SUB_TEST&lt;/F_SUBTYPE&gt;
    &lt;G&gt;
    &lt;H&gt;
    &lt;H_TYPE&gt;Ipod&lt;/H_TYPE&gt;
    &lt;H_MODE&gt;SCANNING&lt;/H_MODE&gt;
    &lt;/H&gt;
    &lt;/G&gt;
    &lt;/F&gt;
    &lt;E&gt;&lt;/E&gt;
    &lt;/D&gt;
    &lt;D&gt;
    &lt;D_ID&gt;D_0004&lt;/D_ID&gt;
    &lt;D_UQ_ID&gt;UQ_D_0004&lt;/D_UQ_ID&gt;
    &lt;D_TIME&gt;2007 FEB 44:44:44.44&lt;/D_TIME&gt;
    &lt;F&gt;
    &lt;F_TYPE&gt;F_TYPE_TEST&lt;/F_TYPE&gt;
    &lt;F_SUBTYPE&gt;SUB_TEST&lt;/F_SUBTYPE&gt;
    &lt;G&gt;
    &lt;H&gt;
    &lt;H_TYPE&gt;Ipod&lt;/H_TYPE&gt;
    &lt;H_MODE&gt;SCANNING&lt;/H_MODE&gt;
    &lt;H_SHAPE&gt;
    &lt;POLYGON&gt;
    &lt;SEQ_NUM&gt;1&lt;/SEQ_NUM&gt;
    &lt;LAT&gt;10.1&lt;/LAT&gt;
    &lt;LON&gt;11.1&lt;/LON&gt;
    &lt;SEQ_NUM&gt;2&lt;/SEQ_NUM&gt;
    &lt;LAT&gt;20.2&lt;/LAT&gt;
    &lt;LON&gt;22.2&lt;/LON&gt;
    &lt;SEQ_NUM&gt;3&lt;/SEQ_NUM&gt;
    &lt;LAT&gt;30.3&lt;/LAT&gt;
    &lt;LON&gt;33.3&lt;/LON&gt;
    &lt;SEQ_NUM&gt;4&lt;/SEQ_NUM&gt;
    &lt;LAT&gt;40.4&lt;/LAT&gt;
    &lt;LON&gt;44.4&lt;/LON&gt;
    &lt;/POLYGON&gt;
    &lt;CIRCLE&gt;
    &lt;LAT&gt;12.3&lt;/LAT&gt;
    &lt;LON&gt;45.6&lt;/LON&gt;
    &lt;RAD&gt;78.9&lt;/RAD&gt;
    &lt;/CIRCLE&gt;
    &lt;ELLIPSE&gt;
    &lt;ORIENT&gt;99.90&lt;/ORIENT&gt;
    &lt;MAJ_AX&gt;111.10&lt;/MAJ_AX&gt;
    &lt;MIN_AX&gt;222.20&lt;/MIN_AX&gt;
    &lt;/ELLIPSE&gt;
    &lt;/H_SHAPE&gt;
    &lt;/H&gt;
    &lt;/G&gt;
    &lt;/F&gt;
    &lt;E&gt;&lt;/E&gt;
    &lt;/D&gt;
    &lt;D&gt;
    &lt;D_ID&gt;D_0005&lt;/D_ID&gt;
    &lt;D_UQ_ID&gt;UQ_D_0005&lt;/D_UQ_ID&gt;
    &lt;D_TIME&gt;2007 FEB 55:55:55.55&lt;/D_TIME&gt;
    &lt;F&gt;
    &lt;F_TYPE&gt;F_TYPE_TEST&lt;/F_TYPE&gt;
    &lt;F_SUBTYPE&gt;SUB_TEST&lt;/F_SUBTYPE&gt;
    &lt;/F&gt;
    &lt;E&gt;&lt;/E&gt;
    &lt;/D&gt;
    &lt;D&gt;
    &lt;D_ID&gt;D_0006&lt;/D_ID&gt;
    &lt;D_UQ_ID&gt;UQ_D_0006&lt;/D_UQ_ID&gt;
    &lt;D_TIME&gt;2007 FEB 66:66:66.66&lt;/D_TIME&gt;
    &lt;F&gt;
    &lt;F_TYPE&gt;F_TYPE_TEST&lt;/F_TYPE&gt;
    &lt;F_SUBTYPE&gt;SUB_TEST&lt;/F_SUBTYPE&gt;
    &lt;G&gt;
    &lt;H&gt;
    &lt;H_TYPE&gt;Ipod&lt;/H_TYPE&gt;
    &lt;H_MODE&gt;SCANNING&lt;/H_MODE&gt;
    &lt;H_SHAPE&gt;
    &lt;POLYGON&gt;
    &lt;SEQ_NUM&gt;1&lt;/SEQ_NUM&gt;
    &lt;LAT&gt;10.1&lt;/LAT&gt;
    &lt;LON&gt;11.1&lt;/LON&gt;
    &lt;SEQ_NUM&gt;2&lt;/SEQ_NUM&gt;
    &lt;LAT&gt;20.2&lt;/LAT&gt;
    &lt;LON&gt;22.2&lt;/LON&gt;
    &lt;SEQ_NUM&gt;3&lt;/SEQ_NUM&gt;
    &lt;LAT&gt;30.3&lt;/LAT&gt;
    &lt;LON&gt;33.3&lt;/LON&gt;
    &lt;SEQ_NUM&gt;4&lt;/SEQ_NUM&gt;
    &lt;LAT&gt;40.4&lt;/LAT&gt;
    &lt;LON&gt;44.4&lt;/LON&gt;
    &lt;/POLYGON&gt;
    &lt;CIRCLE&gt;
    &lt;LAT&gt;12.3&lt;/LAT&gt;
    &lt;LON&gt;45.6&lt;/LON&gt;
    &lt;RAD&gt;78.9&lt;/RAD&gt;
    &lt;/CIRCLE&gt;
    &lt;ELLIPSE&gt;
    &lt;ORIENT&gt;99.90&lt;/ORIENT&gt;
    &lt;MAJ_AX&gt;111.10&lt;/MAJ_AX&gt;
    &lt;MIN_AX&gt;222.20&lt;/MIN_AX&gt;
    &lt;/ELLIPSE&gt;
    &lt;/H_SHAPE&gt;
    &lt;/H&gt;
    &lt;/G&gt;
    &lt;/F&gt;
    &lt;E&gt;&lt;/E&gt;
    &lt;/D&gt;
    &lt;D&gt;
    &lt;D_ID&gt;D_0007&lt;/D_ID&gt;
    &lt;D_UQ_ID&gt;UQ_D_0007&lt;/D_UQ_ID&gt;
    &lt;D_TIME&gt;2007 FEB 77:77:77.77&lt;/D_TIME&gt;
    &lt;F&gt;
    &lt;F_TYPE&gt;F_TYPE_TEST&lt;/F_TYPE&gt;
    &lt;F_SUBTYPE&gt;SUB_TEST&lt;/F_SUBTYPE&gt;
    &lt;G&gt;
    &lt;H&gt;
    &lt;H_TYPE&gt;Ipod&lt;/H_TYPE&gt;
    &lt;H_MODE&gt;SCANNING&lt;/H_MODE&gt;
    &lt;/H&gt;
    &lt;/G&gt;
    &lt;/F&gt;
    &lt;E&gt;&lt;/E&gt;
    &lt;/D&gt;
    &lt;D&gt;
    &lt;D_ID&gt;D_0008&lt;/D_ID&gt;
    &lt;D_UQ_ID&gt;UQ_D_0008&lt;/D_UQ_ID&gt;
    &lt;D_TIME&gt;2007 FEB 88:88:88.88&lt;/D_TIME&gt;
    &lt;F&gt;
    &lt;F_TYPE&gt;F_TYPE_TEST&lt;/F_TYPE&gt;
    &lt;F_SUBTYPE&gt;SUB_TEST&lt;/F_SUBTYPE&gt;
    &lt;G&gt;
    &lt;H&gt;
    &lt;H_TYPE&gt;Ipod&lt;/H_TYPE&gt;
    &lt;H_MODE&gt;SCANNING&lt;/H_MODE&gt;
    &lt;H_SHAPE&gt;
    &lt;POLYGON&gt;
    &lt;SEQ_NUM&gt;1&lt;/SEQ_NUM&gt;
    &lt;LAT&gt;10.1&lt;/LAT&gt;
    &lt;LON&gt;11.1&lt;/LON&gt;
    &lt;SEQ_NUM&gt;2&lt;/SEQ_NUM&gt;
    &lt;LAT&gt;20.2&lt;/LAT&gt;
    &lt;LON&gt;22.2&lt;/LON&gt;
    &lt;SEQ_NUM&gt;3&lt;/SEQ_NUM&gt;
    &lt;LAT&gt;30.3&lt;/LAT&gt;
    &lt;LON&gt;33.3&lt;/LON&gt;
    &lt;SEQ_NUM&gt;4&lt;/SEQ_NUM&gt;
    &lt;LAT&gt;40.4&lt;/LAT&gt;
    &lt;LON&gt;44.4&lt;/LON&gt;
    &lt;/POLYGON&gt;
    &lt;CIRCLE&gt;
    &lt;LAT&gt;12.3&lt;/LAT&gt;
    &lt;LON&gt;45.6&lt;/LON&gt;
    &lt;RAD&gt;78.9&lt;/RAD&gt;
    &lt;/CIRCLE&gt;
    &lt;ELLIPSE&gt;
    &lt;ORIENT&gt;88.80&lt;/ORIENT&gt;
    &lt;MAJ_AX&gt;111.10&lt;/MAJ_AX&gt;
    &lt;MIN_AX&gt;222.20&lt;/MIN_AX&gt;
    &lt;/ELLIPSE&gt;
    &lt;/H_SHAPE&gt;
    &lt;/H&gt;
    &lt;/G&gt;
    &lt;/F&gt;
    &lt;E&gt;&lt;/E&gt;
    &lt;/D&gt;
    &lt;C&gt;TPS Report 4&lt;/C&gt;
    &lt;/A_B_C&gt;
    SELECT statement:
    SELECT a_level.a_class
    , d_level.D_UQ_ID
    , d_level.D_TIME
    , h_level.SEQ_NUM
    , h_level.LAT
    , h_level.LON
    FROM ABC_XML,
    XMLTABLE('/A_B_C'
    PASSING ABC_XML.ABC_SPEC
    COLUMNS
    A_CLASS VARCHAR2(4000 BYTE) PATH '/A_B_C/A/B'
    , D XMLTYPE PATH 'D'
    ) a_level,
    XMLTABLE ('/D'
    PASSING a_level.D
    COLUMNS
    D_UQ_ID varchar2(4000) PATH 'D_UQ_ID'
    , D_TIME varchar2(4000) PATH 'D_TIME'
    , POLYGON XMLTYPE PATH 'F/G/H/H_SHAPE/POLYGON'
    ) d_level
    XMLTABLE('/POLYGON'
    passing d_level.POLYGON
    COLUMNS
    SEQ_NUM NUMBER PATH 'SEQ_NUM'
    , LAT NUMBER PATH 'LAT)'
    , LON NUMBER PATH 'LON'
    ) h_level;
    As you see I need to return data from three levels of data (a, d and h). I can remark out the bottom level (h_level) and the statement runs returning 8 rows from the xml file above (which is correct). The h_level XMLTABLE reference returns the ORA-19279 error. The full statement should return 20 rows of data.

    Yes. I looked at that string.
    Never mind on this one. You helped solve the problem in another string
    XMLTable 'For $i in ... return ROW' clause help needed

  • Type Mismatch error while saving a BPC Report using eTools

    Hi,
    Iam getting a 'type mismatch' error when trying to save a BPC Excel  workbook using eTools>Save Dynamic Template >Company>eExcel. I am saving it as an .xlsx file.
    Can anyone please help out and let me know why I am getting this error.
    Thanks
    Arvind

    Hi,
    You need to save the file as .xls extension.

  • Type Mismatch error

    Hi,
    Iam getting a 'type mismatch' error when trying to save a BPC Excel Ecel workbook using eTools>Save Dynamic Template >Company>eExcel. I am saving it as an .xlsx file.
    Can anyone please help out and let me know why I am getting this error.
    Thanks
    Arvind

    Hi Arvind,
    You need to save the template as .xls file. This will work properly.

  • "Type mismatch" error in IE7/8 when using custom Actions Menu Image

    Hi all,
    in APEX 4.2: when using a custom image in the "Actions Menu Image" attribute in an interactive report, I get a "Type mismatch" error in IE7/8 when refreshing the report through PPR (filtering, sorting, paginating etc.). When I leave the "Actions Menu Image" field empty, everything works fine. The error doesn't seem to happen in IE9 (unless using compatibility mode), or in any non-IE browser.
    I've been able to reproduce the issue in an application on apex.oracle.com:
    http://apex.oracle.com/pls/apex/f?p=69347:1
    Some debugging seems to indicate that the following line in widget.interactiveReport.js is the culprit:
    lTemp.parentNode.replaceChild($x('apexir_WORKSHEET'), lTemp);Does anybody know if this is a known issue, or if there is some workaround?
    Thanks,
    Tobias

    Hi,
    Great solution Paul! It cost me a while before I found out the Action Menu Image was causing my interactive reports to stop refreshing in IE10 and not other browsers. Your solution works great, I've implemented it with a few minor adjustments:
    - Put the css in report template (for some reason it didn't work in our own application stylesheet)
    - replace  'url("/c/action_dropdown.gif")' with 'url("&APP_IMAGE_PREFIX./<path_to_image>")'
    - place one dynamic action on page 0: after refresh of '#apexir_DATA_PANEL' , set event scope to "Dynamic".
    - Let the Dynamic action also fire on page load.
    - To make sure the dynamic action only works for pages with an interactive report add condition of type 'Exists' with expression:
    select 1
    from   dual
    where  :APP_PAGE_ID in (select page_id
                                            from   apex_application_page_ir
                                            where  application_id = :APP_ID
    Best regards,
    Vincent Deelen

  • Type mismatch error on my web page

    I have a web page which calling the Javascript function like below:
    function initoptymenu(row, col) {
    var a = document.applets.Tree;
    var m = a.menu();
    if (m == null) return;
    m.removeAll();
    if (row.substr(0,1) == 'Q') {
    m.Add("View Quote");
    m.Add("Mark active");
    else {
    m.Add("Remove Opportunity");
    m.Add("View/Edit Opportunity");
    But, when the event happen to call this function on my web page, I got an type mismatch error. and the java console shows the Error as :
    netscape.javascript.JSException: Failure to evaluate initoptymenu('Q1831',0)
    Could anyone know what I need to do the make it work?
    Thanks so much.
    shuning

    It is kinda hard to tell without seeing the rest of the script....
    But your script function is expecting a string and a number as arguments, but sure that the caller (which you didn't post) is supplying the correct type of arguments.
    V.V.

  • TYPE003: Runtime Type Mismatch

    A general question:
    ODSI 10gR3
    Has anyone seen the "TYPE003: Runtime Type Mismatch" error returned when you pass a variable through a function rather than a literal? The variable is the exact same value as the literal and I have casted all to a xs:double before passing through the "getReferencesByVersionID" function in code below.
    =============================================================
    (: Always tested with the same $VersionID and only 1 order in the database :)
    for $Order in tns:getOrdersByVersionID($VersionID)
    return
    (: let $OrderNum := tns:getOrderNum(fn:data($Order/ns1:OrderNum)) :) (: Fail :)
    let $OrderNum := xs:double(fn:data($Order/ns1:OrderNum)) (: Fail :)
    (: let $OrderNum := xs:double(12001002) :) (: Success :)
    let $References := tns:getReferencesByVersionID($VersionID, $OrderNum)
    return
    Returned XML snippet when run successfully:
    <ns0:Order ns0:TransactionPurpose="ADD/UPDATE">
    <ns0:ShipperRef>J10310ST12001002</ns0:ShipperRef>
    <ns0:OrderNum>12001002</ns0:OrderNum> (: Populated by: "data($Order/ns1:OrderNum)". "ns0:OrderNum" defined as xs:double in schema. Note: same value as literal :)
    <ns0:Comments/>
    <ns0:OrderType>O</ns0:OrderType>
    <ns0:Workflow>O</ns0:Workflow>
    Returned Trace when not working:
    com.bea.dsp.das.exception.DASException: weblogic.xml.query.exceptions.XQueryTypeException: {bea-err}TYPE003: Runtime Type Mismatch
         at com.bea.dsp.das.ejb.EJBClient.invokeOperation(EJBClient.java:160)
         at com.bea.dsp.das.DataAccessServiceImpl.invokeOperation(DataAccessServiceImpl.java:171)
         at com.bea.dsp.das.DataAccessServiceImpl.invoke(DataAccessServiceImpl.java:122)
         at com.bea.dsp.ide.xquery.views.test.QueryExecutor.invokeFunctionOrProcedure(QueryExecutor.java:113)
         at com.bea.dsp.ide.xquery.views.test.XQueryTestViewContent.getFunctionExecutionResult(XQueryTestView.java:1041)
         at com.bea.dsp.ide.xquery.views.test.XQueryTestViewContent.executeFunction(XQueryTestView.java:1176)
         at com.bea.dsp.ide.xquery.views.test.XQueryTestViewContent.widgetSelectedImpl(XQueryTestView.java:1866)
         at com.bea.dsp.ide.xquery.views.test.XQueryTestViewContent.access$300(XQueryTestView.java:174)
         at com.bea.dsp.ide.xquery.views.test.XQueryTestViewContent$3.run(XQueryTestView.java:1594)
         at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67)
         at com.bea.dsp.ide.xquery.views.test.XQueryTestViewContent.widgetSelectedBusy(XQueryTestView.java:1597)
         at com.bea.dsp.ide.xquery.views.test.XQueryTestViewContent.widgetSelected(XQueryTestView.java:1560)
         at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:227)
         at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
         at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
         at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3687)
         at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3298)
         at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2389)
         at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
         at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2219)
         at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
         at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289)
         at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461)
         at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
         at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106)
         at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:169)
    The obvious answer is that "fn:data($Order/ns1:OrderNum)" does not equal "xs:double(12001002)" when passed through the " tns:getReferencesByVersionID()" function but it appears to be the same value.
    This is happening in the Application layer so too much to include all the code. Thoughts/Comments on where to look or what I am missing?
    Thanks
    Tom

    Thanks Mike. No other web services... all physical ODSI to a single Oracle 11g denormalized table, selected several times to get different parts of the data (order header, shipping info, items, etc) and bubbled up through the layers via transformations finally getting into a single XML ORDER at the app layer.
    I'm not a guru at reading traces but it appears numieric vs double issue?
    The full stack trace:
    weblogic.xml.query.exceptions.XQueryTypeException: {bea-err}TYPE003: Runtime Type Mismatch
         at weblogic.xml.query.runtime.core.ExecutionWrapper.asXQueryException(ExecutionWrapper.java:165)
         at weblogic.xml.query.runtime.core.ExecutionWrapper.fetchNext(ExecutionWrapper.java:94)
         at weblogic.xml.query.iterators.GenericIterator.hasNext(GenericIterator.java:133)
         at weblogic.xml.query.runtime.node.DeflateRec.fetchNext(DeflateRec.java:43)
         at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:104)
         at com.bea.ld.server.ResultPusher$ChunkyBinxmlChunker.nextChunk(ResultPusher.java:402)
         at com.bea.ld.server.ResultPusher$AsyncChunkyBinxmlChunker.nextChunk(ResultPusher.java:520)
         at com.bea.ld.server.ResultPusher$BinxmlChunker.next(ResultPusher.java:292)
         at com.bea.ld.EJBRequestHandler$1.next(EJBRequestHandler.java:938)
         at com.bea.ld.ServerBean.maybeStreamResult(ServerBean.java:97)
         at com.bea.ld.ServerBean.executeOperationStreaming(ServerBean.java:86)
         at com.bea.ld.Server_ydm4ie_EOImpl.executeOperationStreaming(Server_ydm4ie_EOImpl.java:72)
         at com.bea.ld.Server_ydm4ie_EOImpl_WLSkel.invoke(Unknown Source)
         at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:589)
         at weblogic.rmi.cluster.ClusterableServerRef.invoke(ClusterableServerRef.java:230)
         at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:477)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
         at weblogic.security.service.SecurityManager.runAs(Unknown Source)
         at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:473)
         at weblogic.rmi.internal.wls.WLSExecuteRequest.run(WLSExecuteRequest.java:118)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    java.lang.ClassCastException: weblogic.xml.query.tokens.basic.Basic_StringToken
         at weblogic.xml.query.runtime.numeric.compare.DoubleEqual.compare(DoubleEqual.java:31)
         at weblogic.xml.query.runtime.compare.ComparisonIterator.execute(ComparisonIterator.java:45)
         at weblogic.xml.query.iterators.FunctionIterator.fetchNext(FunctionIterator.java:30)
         at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:104)
         at weblogic.xml.query.runtime.logic.BoolEffValue.exec(BoolEffValue.java:47)
         at weblogic.xml.query.runtime.logic.BoolEffValue.execute(BoolEffValue.java:43)
         at weblogic.xml.query.iterators.FunctionIterator.fetchNext(FunctionIterator.java:30)
         at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:104)
         at weblogic.xml.query.runtime.core.IfThenElse.fetchNext(IfThenElse.java:79)
         at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:104)
         at weblogic.xml.query.runtime.core.CountMapIterator.fetchNext(CountMapIterator.java:167)
         at weblogic.xml.query.iterators.GenericIterator.peekNext(GenericIterator.java:163)
         at weblogic.xml.query.runtime.constructor.SuperElementConstructor.getPhase2(SuperElementConstructor.java:388)
         at weblogic.xml.query.runtime.constructor.PartMatElemConstructor.matEverything(PartMatElemConstructor.java:123)
         at weblogic.xml.query.runtime.constructor.PartMatElemConstructor.fetchNext(PartMatElemConstructor.java:197)
         at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:104)
         at weblogic.xml.query.runtime.core.IfThenElse.fetchNext(IfThenElse.java:91)
         at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:104)
         at weblogic.xml.query.runtime.core.IfThenElse.fetchNext(IfThenElse.java:91)
         at weblogic.xml.query.iterators.GenericIterator.peekNext(GenericIterator.java:163)
         at weblogic.xml.query.runtime.navigation.ChildPath.fetchNext(ChildPath.java:221)
         at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:104)
         at weblogic.xml.query.iterators.BasicMaterializedTokenStream.next(BasicMaterializedTokenStream.java:109)
         at weblogic.xml.query.iterators.BasicMaterializedTokenStream$MatStreamIterator.fetchNext(BasicMaterializedTokenStream.java:448)
         at weblogic.xml.query.iterators.LegacyGenericIterator.next(LegacyGenericIterator.java:109)
         at weblogic.xml.query.runtime.core.RTVariable.fetchNext(RTVariable.java:53)
         at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:104)
         at weblogic.xml.query.runtime.sequences.Exists.execute(Exists.java:37)
         at weblogic.xml.query.iterators.FunctionIterator.fetchNext(FunctionIterator.java:30)
         at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:104)
         at weblogic.xml.query.runtime.core.IfThenElse.fetchNext(IfThenElse.java:79)
         at weblogic.xml.query.iterators.GenericIterator.peekNext(GenericIterator.java:163)
         at weblogic.xml.query.runtime.constructor.SuperElementConstructor.getPhase2(SuperElementConstructor.java:388)
         at weblogic.xml.query.runtime.constructor.PartMatElemConstructor.matEverything(PartMatElemConstructor.java:123)
         at weblogic.xml.query.runtime.constructor.PartMatElemConstructor.fetchNext(PartMatElemConstructor.java:197)
         at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:104)
         at weblogic.xml.query.iterators.BasicMaterializedTokenStream.next(BasicMaterializedTokenStream.java:109)
         at weblogic.xml.query.iterators.BasicMaterializedTokenStream$MatStreamIterator.fetchNext(BasicMaterializedTokenStream.java:448)
         at weblogic.xml.query.iterators.LegacyGenericIterator.next(LegacyGenericIterator.java:109)
         at weblogic.xml.query.runtime.core.RTVariable.fetchNext(RTVariable.java:53)
         at weblogic.xml.query.iterators.GenericIterator.peekNext(GenericIterator.java:163)
         at weblogic.xml.query.runtime.navigation.ChildPath.fetchNext(ChildPath.java:221)
         at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:104)
         at weblogic.xml.query.runtime.sequences.Exists.execute(Exists.java:37)
         at weblogic.xml.query.iterators.FunctionIterator.fetchNext(FunctionIterator.java:30)
         at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:104)
         at weblogic.xml.query.runtime.core.IfThenElse.fetchNext(IfThenElse.java:79)
         at weblogic.xml.query.iterators.GenericIterator.peekNext(GenericIterator.java:163)
         at weblogic.xml.query.runtime.constructor.SuperElementConstructor.buildPreserveModeTextNode(SuperElementConstructor.java:320)
         at weblogic.xml.query.runtime.constructor.SuperElementConstructor.getPhase2(SuperElementConstructor.java:405)
         at weblogic.xml.query.runtime.constructor.PartMatElemConstructor.matEverything(PartMatElemConstructor.java:123)
         at weblogic.xml.query.runtime.constructor.PartMatElemConstructor.fetchNext(PartMatElemConstructor.java:197)
         at weblogic.xml.query.iterators.GenericIterator.peekNext(GenericIterator.java:163)
         at weblogic.xml.query.runtime.constructor.SuperElementConstructor.getPhase2(SuperElementConstructor.java:388)
         at weblogic.xml.query.runtime.constructor.PartMatElemConstructor.fetchNext(PartMatElemConstructor.java:229)
         at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:104)
         at weblogic.xml.query.runtime.core.LetIterator.fetchNext(LetIterator.java:133)
         at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:104)
         at weblogic.xml.query.runtime.core.LetIterator.fetchNext(LetIterator.java:133)
         at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:104)
         at weblogic.xml.query.runtime.core.LetIterator.fetchNext(LetIterator.java:133)
         at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:104)
         at weblogic.xml.query.runtime.core.LetIterator.fetchNext(LetIterator.java:133)
         at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:104)
         at weblogic.xml.query.runtime.core.LetIterator.fetchNext(LetIterator.java:133)
         at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:104)
         at weblogic.xml.query.runtime.core.CountMapIterator.fetchNext(CountMapIterator.java:167)
         at weblogic.xml.query.iterators.GenericIterator.peekNext(GenericIterator.java:163)
         at weblogic.xml.query.runtime.constructor.SuperElementConstructor.getPhase2(SuperElementConstructor.java:388)
         at weblogic.xml.query.runtime.constructor.PartMatElemConstructor.fetchNext(PartMatElemConstructor.java:229)
         at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:104)
         at weblogic.xml.query.runtime.debug.Trace.fetchNext(Trace.java:70)
         at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:104)
         at weblogic.xml.query.xdbc.iterators.ItemIterator.fetchNext(ItemIterator.java:86)
         at weblogic.xml.query.iterators.LegacyGenericIterator.hasNext(LegacyGenericIterator.java:130)
         at weblogic.xml.query.runtime.sequences.Subsequence.fetchNext(Subsequence.java:101)
         at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:104)
         at weblogic.xml.query.runtime.querycide.QueryAssassin.fetchNext(QueryAssassin.java:54)
         at weblogic.xml.query.iterators.GenericIterator.peekNext(GenericIterator.java:163)
         at weblogic.xml.query.runtime.qname.InsertNamespaces.fetchNext(InsertNamespaces.java:237)
         at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:104)
         at weblogic.xml.query.runtime.core.ExecutionWrapper.fetchNext(ExecutionWrapper.java:88)
         at weblogic.xml.query.iterators.GenericIterator.hasNext(GenericIterator.java:133)
         at weblogic.xml.query.runtime.node.DeflateRec.fetchNext(DeflateRec.java:43)
         at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:104)
         at com.bea.ld.server.ResultPusher$ChunkyBinxmlChunker.nextChunk(ResultPusher.java:402)
         at com.bea.ld.server.ResultPusher$AsyncChunkyBinxmlChunker.nextChunk(ResultPusher.java:520)
         at com.bea.ld.server.ResultPusher$BinxmlChunker.next(ResultPusher.java:292)
         at com.bea.ld.EJBRequestHandler$1.next(EJBRequestHandler.java:938)
         at com.bea.ld.ServerBean.maybeStreamResult(ServerBean.java:97)
         at com.bea.ld.ServerBean.executeOperationStreaming(ServerBean.java:86)
         at com.bea.ld.Server_ydm4ie_EOImpl.executeOperationStreaming(Server_ydm4ie_EOImpl.java:72)
         at com.bea.ld.Server_ydm4ie_EOImpl_WLSkel.invoke(Unknown Source)
         at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:589)
         at weblogic.rmi.cluster.ClusterableServerRef.invoke(ClusterableServerRef.java:230)
         at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:477)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
         at weblogic.security.service.SecurityManager.runAs(Unknown Source)
         at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:473)
         at weblogic.rmi.internal.wls.WLSExecuteRequest.run(WLSExecuteRequest.java:118)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)

  • OEM error " Type Mismatch "

    Hi ,
    I have OEM v1.6 on Oracle 8.0.5 on NT. While creating the job,
    when I hit the schedule tab, I get the following eror message
    " Type Mismatch " ( No error number )
    How to avoid this ? Is there any thing that needs to be set up
    to avoid this error messgae.
    I configured all the files (
    tnsnames.ora,listner.ora,sqlnet.ora,snmp_ro.ora,snmp_rw.ora,servi
    ces.ora ) correctly.
    Also there is no proper documentation on this error.
    Has any one ever got this problem . Please let me know, if you
    have a solution.
    Thanks
    Chandra Kapireddy
    null

    You need to download the latest patch. Sorry, do not have
    the I.P. address handy. However, oracle support will
    gladly give you the I.P. address.
    Chandra Kapireddy (guest) wrote:
    : Hi ,
    : I have OEM v1.6 on Oracle 8.0.5 on NT. While creating the
    job,
    : when I hit the schedule tab, I get the following eror message
    : " Type Mismatch " ( No error number )
    : How to avoid this ? Is there any thing that needs to be set up
    : to avoid this error messgae.
    : I configured all the files (
    tnsnames.ora,listner.ora,sqlnet.ora,snmp_ro.ora,snmp_rw.ora,servi
    : ces.ora ) correctly.
    : Also there is no proper documentation on this error.
    : Has any one ever got this problem . Please let me know, if you
    : have a solution.
    : Thanks
    : Chandra Kapireddy
    null

  • Query Returning ORA-19279

    I've got an xml file that I'm loading into a view defined as an xmlType. The view name is eachFile with a single column of myType that is defined as an xmlType. The structure of the xml is:
    <CASE_BATCH>
    <CASE_COUNT>2</CASE_COUNT>
    <XML_BATCH_TRANS>1012</XML_BATCH_TRANS>
    <XML_BATCH_DATE>02/07/2007 14:46:14</XML_BATCH_DATE>
    <CASEDETAIL>
    <HEADER>
    <CASE_TRANS>1044</CASE_TRANS>
    <UPDATE_TYPE>I</UPDATE_TYPE>
    <CASE>26968</CASE>
    <PERSON_ID>197192</PERSON_ID>
    +<NAME>
    </NAME>
    +<ADDRESS>
    </ADDRESS>
    +<VITAL_STATS>
    </VITAL_STATS>
    +<MEDICAL>
    </MEDICAL>
    +<RESIDENCY>
    </RESIDENCY>
    +<DESCRIPTION>
    </DESCRIPTION>
    +<SCHOOL>
    </SCHOOL>
    <OTHER>
    </OTHER>
    </HEADER>
    <CASEDETAIL>
    <HEADER>
    <CASE_TRANS>1045</CASE_TRANS>
    <UPDATE_TYPE>I</UPDATE_TYPE>
    <CASE>26969</CASE>
    <PERSON_ID>197193</PERSON_ID>
    </<CASE_BATCH>
    I've omitted non-essential data, but in general the structure is that within each <CASE_BATCH> tag there is the potential of multiple <CASE_DETAIL> tags, and each <CASE_DETAIL> tag has some data of which the <PERSON_ID> is what I need to retrieve.
    I've tried several different approaches to retrieve <PERSON_ID> tag value, but nothing I try works, I either get no rows returned or an ORA-19279. What I'd like to do is open this up in a stored procedure as a cursor so I can loop through the subordinate data in the xml format and do some insertion/modification of relational tables.
    Here's what I've tried that seemed to me to be the most promising:
    select a.*
    from eachFile,
    xmltable('/CASE_BATCH'
    passing eachfile.mytype
    columns
    extnum varchar2(30) PATH '/CASE_BATCH/CASEDETAIL/HEADER/PERSON_ID') a
    How query an xml-based view knowing that it may return multiple rows?

    I do need other columns at that level, but I've gotten that to work simply by adding additional column definitions at that level. I'm trying to do this process incrementally so I can tell when I break things. Now that I've gotten the first level of query to work, I need to do some queries against some of the lower levels. What I had in mind was to use the number retrieved as 'extnum' as a part of the where clause for additional queries. Unfortunately, now I can't get that level to work.
    Here's what I've got now:
    select B.*
    from eachFile,
    xmltable('/CASE_BATCH/CASEDETAIL'
    passing eachfile.mytype
    columns
    extnum number PATH '/CASEDETAIL/HEADER/PERSON_ID') A,
    xmltable('CASE_BATCH/CASEDETAIL'
    passing eachfile.mytype
    columns
    extnum number PATH '/CASEDETAIL/HEADER/PERSON_ID',
    firstName varchar2(30) PATH '/NAME/FIRSTNAME',
    middleName varchar2(30) path '/NAME/MIDDLENAME',
    lastName varchar2(30) path '/NAME/LASTNAME',
    suffix varchar2(30) path '/NAME/SUFFIX') b
    where
    a.extnum = 214339 AND
    a.extnum = b.extnum
    This query as written returns the extnum value (The hard-coded value is one retrieved from the previous query that I'm just using to test with) but no name data. I have no doubt this is related to how you specitfy the path in both or either the xmlTable or the column definition, but I don't understand the correct way to specify it, especially when I'm using a comparative value that's at a higher node in the XML than the subordinate nodes data that I need to retrieve.
    I've got a whole bunch of this type of query to write at lower and lower nodes in the XML structure, so once I get this one to work, I am (hopefully!) good to go. How can I use a higher node's value to query subordinate node data when there are multiples of the higher node?

Maybe you are looking for

  • Some questions on BudAPI

    Hi all Two questions about budAPI: 1) I wonder if there is any way to make two MIAW to appear on top of the stage window in a full screen mode. Currently my two MIAW disappear in a full screen mode but work fine when i uncheck this option 2) I have t

  • Automatic Refresh when site is changed

    After the great service on another question, I thought I would pose my next. i have been using the Blog page on Iweb to be able to inform users of latest news. The problem is when the link is clicked to take them there, they generally get the old pag

  • Correct XPath to delete single keyword?

    I am trying to update keywords in XMP data using the XMP toolkit. I don't seem to be able to get the correct XPath to delete only 1 keyword in the "subject" bag. My code looks like this: // "Asia" does not get removed (no exceptions get thrown, eithe

  • Audio/Soud is not working

    Hi, I have a notebook Pavilion dv7-4295us with windows 7 64-bit and my sound is not working. I tried to reinstall the driver, but the problem continue. But when i plug phones the audio is normally. I don't know what can be. Anyone can help me. Thanks

  • TS1424 some of my music has only part of the song or none at all...how do I redownload?

    I need to put my music back in my phone after it was wiped out.  Ever since then, I have only some of my songs.  All of the items I purchased were there but did not download in its entirety. How do I re-download my music?