XML-SQL  multiple SQL_QUERY to sing row instances..

Hello,
Is it possible to run multiple querys and return them all to a structure like this..
<HEADER_SELECTS>
   <row>
       <select results1></select results1>
   </row>
   <row>
       <select results2></select results2>
   </row>
</HEADER_SELECTS>
I have tried several data type structures, but all of them execute only the first "access" SQL_QUERY option.

Hi Tom,
A suggestion : you could go for SQL joins.
Concerbed weblog is:
https://www.sdn.sap.com/sdn/weblogs.sdn?blog=/pub/wlg/1725 [original link is broken] [original link is broken] [original link is broken] [original link is broken] [original link is broken] [original link is broken] [original link is broken] [original link is broken] [original link is broken]
hope this helps.
Regards,
Priyanka

Similar Messages

  • How to open multiple sql files in only one ssms instance

    how to open multiple sql files in only one ssms instance, I can't get anything to work that I find online..I hope you can help us.

    I tried opening two files but selecting and hitting enter. it opens one SSMS and two tabs.
    Balmukund Lakhani
    Please mark solved if I've answered your question, vote for it as helpful to help other users find a solution quicker
    This posting is provided "AS IS" with no warranties, and confers no rights.
    My Blog |
    Team Blog | @Twitter
    | Facebook
    Author: SQL Server 2012 AlwaysOn -
    Paperback, Kindle

  • XML SQL Utility & ROW-Tag

    Hi,
    I have a question about the XML SQL Utility.
    Must I have the <ROOTDOC> and <ROW> TAG's in my XML-Document to insert the Document with the Utility in my Database, or can I use a random defined TAG as start TAG, e.g. the <BOOK_ID>.
    XML-Document:
    Book.xml
    <?xml version="1.0" encoding="UTF-16"?>
    <!DOCTYPE ANWENDUNGEN SYSTEM "file:/E:/book.dtd">
    <!-- ?xml-stylesheet href="book.xsl" type="text/xsl"? -->
    <ROOTDOC>
    <ROW>
    <BOOK_ID>55-66</BOOK_ID>
    <BOOK_NAME>JavaScript</BOOK_NAME>
    <REF_TO_PRICE>2-AA</REF_TO_PRICE>
    <PRICE_ID>2-AA</PRICE_ID>
    <PRICE_DM>55.50DM</PPRICE_DM>
    </ROW>
    </ROOTDOC>
    Can anyone help me, please ?
    Thanks
    null

    You can use a "random" tag at the "ROW" tag, using the -rowTag XXXX command line option.
    The utility will attempt to insert the CHILDREN elements of the rowset as if they were the columns of each ROW in the table whose name you provide.

  • Xml sql utility limitation

    Hi, Oracle:
    Are there upper limit with regard to OracleXMLSave.insertXML(),
    such as upper limit for field size, upper limit for file size,
    uppper limit for number of columns you can have, upper limit for
    number of rows(records) you could have?
    Prompt response will be greatly appreciated!
    Thanks,
    Tony
    null

    First, let me thank you for the reply.
    Here is the situation: I want to insert a xml file about 3 MB
    into an Oracle 8.0.5 table, in the table, I have a field called
    resume which is of type LONG. I am using OracleXMLSave.insertXML
    to do the insertion and oci8 jdbc connection. Here the error
    messsage I got:
    SIGSEGV 11* segmentation violation
    si_signo [11]: SIGSEGV 11* segmentation violation
    si_errno [0]:
    si_code [1]: SEGV_MAPERR [addr: 0x342c9fe8]
    stackbase=EFFFF298, stackpointer=EFFFD5D4
    Full thread dump:
    "SIGQUIT handler" (TID:0xed6662a0, sys_thread_t:0xfb400,
    state:R, thread_t: t@5, sp:0xef373a90 threadID:0xef373de0,
    stack_base:0xef373d74, stack_size:0x22000) prio=0
    "Finalizer thread" (TID:0xed666088, sys_thread_t:0xfb370,
    state:CW, thread_t: t@4, sp:0xef473a30 threadID:0xef473de0,
    stack_base:0xef473d74, stack_size:0x22000) prio=1
    "main" (TID:0xed6660b0, sys_thread_t:0xedff8, state:R,
    thread_t: t@1, sp:0xefffedd8 threadID:0x20a18,
    stack_base:0xeffff298, stack_size:0x800000) prio=5 *current
    thread*
    oracle.jdbc.oci8.OCIDBAccess.executeFetch(Compiled Code)
    oracle.jdbc.driver.OracleStatement.doExecuteOther
    (Compiled Code)
    oracle.jdbc.driver.OracleStatement.doExecuteWithBatch
    (Compiled Code)
    oracle.jdbc.driver.OracleStatement.doExecute(Compiled
    Code)
    oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout
    (Compiled Code)
    oracle.jdbc.driver.OraclePreparedStatement.executeUpdate
    (Compiled Code)
    oracle.jdbc.driver.OraclePreparedStatement.execute
    (Compiled Code)
    oracle.xml.sql.dml.OracleXMLSave.insertNodeVal(Compiled
    Code)
    oracle.xml.sql.dml.OracleXMLSave.insertXML(Compiled Code)
    oracle.xml.sql.dml.OracleXMLSave.insertXML(Compiled Code)
    TestSave.main(Compiled Code)
    Monitor Cache Dump:
    oracle.jdbc.oci8.OCIDBAccess@ED66A7E8/ED751B68: owner "main"
    (0xedff8, 1 entry)
    oracle.jdbc.driver.OracleCallableStatement@ED6D0390/EDF17818:
    owner "main" (0xedff8, 2 entries)
    Registered Monitor Dump:
    PCMap lock: <unowned>
    Thread queue lock: <unowned>
    Name and type hash table lock: <unowned>
    String intern lock: <unowned>
    JNI pinning lock: <unowned>
    JNI global reference lock: <unowned>
    BinClass lock: <unowned>
    Class loading lock: <unowned>
    Java stack lock: <unowned>
    Code rewrite lock: <unowned>
    Heap lock: <unowned>
    Has finalization queue lock: <unowned>
    Finalize me queue lock: <unowned>
    Waiting to be notified:
    "Finalizer thread" (0xfb370)
    Monitor registry: owner "main" (0xedff8, 1 entry)
    Abort
    ======= End of error message ========
    If I have a smaller size file, such as 1MB, it works. What could
    be wrong? Oracle JDBC driver? the implementation of
    OracleXMLSave.insertXML?
    Here is the source code of my java program:
    import oracle.xml.sql.dml.*;
    import java.io.*;
    import java.sql.*;
    import oracle.jdbc.driver.*;
    public class TestSave {
    public static void main(String args[])
    if (args.length != 2) {
    System.out.println("Usage: java TestSave tablename
    filename");
    System.exit(1);
    Connection conn;
    String tablename = args[0];
    String filename = args[1];
    try{
    Class.forName("oracle.jdbc.driver.OracleDriver");
    conn = DriverManager.getConnection("jdbc:oracle:oci8:@econ",
    "rich", "roy33");
    OracleXMLSave xmlSave = new OracleXMLSave(conn, tablename);
    System.out.println("xmlSave = " + xmlSave);
    int num_row ;
    java.net.URL url=xmlSave.createURL(filename);
    System.out.println("url="+url);
    num_row=xmlSave.insertXML(url);
    System.out.println("num_row: " + num_row);
    catch(Exception e)
    e.printStackTrace();
    }// end main
    }// end TestSave
    ======= End of source code ====================
    Any suggestions? Please help!!!
    Tony
    Oracle XML Team wrote:
    : Hi Tony,
    : I tried out an example with > 4000 binds and it seemed to
    work
    : with 3 clobs. How big is the sample? Can u attach a small
    sample
    : (dont have to have the big file. just the structure of the
    XML?).
    : Also currently the XML SQL utility simply binds CLOB columns
    as
    : strings. We will fix that so that it creates temp CLOBs and
    : binds them. In that way you will not get into this problem.
    : Thx
    : Oracle XML team
    : Tony (guest) wrote:
    : : All right, I got a problem already. I have a table has 2
    clob
    : : columns, this is the message I got:
    : : oracle.xml.sql.OracleXMLSQLException: java.sql.SQLException:
    : ORA-
    : : 01026: multiple buffers of size > 4000 in the bind list
    : : at java.lang.Throwable.<init>(Compiled Code)
    : : at java.lang.Exception.<init>(Compiled Code)
    : : at java.lang.RuntimeException.<init>(Compiled Code)
    : : at oracle.xml.sql.OracleXMLSQLException.<init>
    : (Compiled
    : : Code)
    : : at oracle.xml.sql.dml.OracleXMLSave.insertXML
    (Compiled
    : : Code)
    : : at oracle.xml.sql.dml.OracleXMLSave.insertXML
    (Compiled
    : : Code)
    : : at TestSave.main(Compiled Code)
    : : Does above mean that the utility can not handle a table has
    : more
    : : than one clob column?
    : : In my applicaiton, I have two fields greater than 4000
    : : characters that I need to insert into a table.
    : : Thanks,
    : : Tony
    : : Tony (guest) wrote:
    : : : I do not see any problems yet, however, I am going to have
    : big
    : : : field size (> 5000 characters), big file size(around 100
    MB)
    : : : which means lots of records. I just want to know whether
    the
    : : : utility can take it, if not, what are the options?
    : : : Thanks,
    : : : Tony
    : : : Oracle XML Team wrote:
    : : : : No designed-in limits. Are you hitting a problem
    : : : : with a large-sized file?
    : : : : Oracle XML Team
    : : : : http://technet.oracle.com
    : : : : Oracle Technology Network
    : Oracle Technology Network
    : http://technet.oracle.com
    null

  • HOWTO: Writing Out XML Query Results of Any Size in Java with XML SQL Utility

    A customer mailed me asking for an example of how to use our XML SQL Utility to write out query results for tons of query result rows.
    With tons of data, the getXMLDOM() and getXMLString() methods are not really appropriate due to the size.
    The XML SQL Utility offers a getXMLSAX() method that streams SAX2 events to report the data being queried. This is the approach we can use to handle data of any size.
    It dawned on me today that by putting together the XML SQL Utilities getXMLSAX() routine, and the oracle.xml.parser.v2.XSLSAXPrintDriver SAX2 ContentHandler, we can effectively stream out data of any length to an appropriate writer.
    Here's a code example to get the point across:
    package test;
    import java.io.BufferedOutputStream;
    import java.io.PrintWriter;
    import java.sql.Connection;
    import java.sql.Driver;
    import java.sql.DriverManager;
    import java.sql.SQLException;
    import java.util.Properties;
    import javax.xml.transform.OutputKeys;
    import oracle.jdbc.OracleDriver;
    import oracle.xml.parser.v2.XSLException;
    import oracle.xml.parser.v2.XSLOutput;
    import oracle.xml.parser.v2.XSLSAXPrintDriver;
    import oracle.xml.sql.query.OracleXMLQuery;
    public class Example  {
      private static final String QUERY = "select * from emp";
      public static void main(String[] args) throws Throwable  {
          Connection conn = getConnection();
          OracleXMLQuery q = new OracleXMLQuery(getConnection(),QUERY);
          // Any printwriter will do. Here's we're output to standard out.
          PrintWriter output = new PrintWriter(new BufferedOutputStream(System.out));
          // This is a SAX2 Content Handler used by the Oracle XSLT Engine
          // to serialize a stream of sax2 events as an XML document
          // We'll use it to serialize the sax2 events from the XML SQL Utility
          // out as an XML document.
          XSLSAXPrintDriver ch = new XSLSAXPrintDriver(output, outputOptions());  
          // This asks XML SQL Utility to fire sax events for the data
          // being fetched instead of creating DOM nodes or returning text.
          // By using the XSLSAXPrintDriver content handler, these events
          // get handled by writing them directly to the output stream
          q.getXMLSAX(ch);
          ch.flush();
          q.close();
          conn.close();     
      private static XSLOutput outputOptions() throws XSLException {
        XSLOutput x = new XSLOutput();
        Properties props = new Properties();
        props.put(OutputKeys.METHOD,"xml");
        props.put(OutputKeys.INDENT,"yes");  // Set to "no" for non-indented
        x.setProps(props);
        return x;
      public static Connection getConnection() throws SQLException {
        String username = "scott";
        String password = "tiger";
        String thinConn = "jdbc:oracle:thin:@localhost:1521:ORCL";
        Driver d = new OracleDriver();
        return DriverManager.getConnection(thinConn,username,password);
    }

    Hi Uber,
    This is a known issue that error occurs when running report "Count of instances of specific software registered with Add or Remove Programs" due to non-printable characters for XML. Based on internal research, the hotfix for this issue will be
    included in the System Center 2012 Configuration Manager Service Pack 1.
    As a workaround, you can remove the nonprintable character populated into the report parameter by referring to the following KB article:
    http://support.microsoft.com/KB/914159
    Hope this helps.
    Regards,
    Mike Yin
    Mike Yin
    TechNet Community Support

  • SPGridView with filtering on Taxonomy Field Multivalue column( column with multiple values in single row)

    Hi
    I have SPGridView  control (fetching value from DB) with a column which is having multiple values
    in single row seperated by ";", whenever filter applied it show these values in single row but i want
    to dispaly these values separately in diff. rows when column filter is applied.
    I have exactly same req. as mentioned in http://sadomovalex.blogspot.in/2011/03/spgridview-with-filtering-by-multiple.html
    but this solution didn't work for me.
    Please help/suggest.

    Hi Erland,
    Thank you very much for the answer. Sorry I had to be more accurate on my XML : This XML is in a SQL Server Table column. This table also has an id column. It will be great if you can answer specifically to this.
    <RootNode>
    <Node1>
    <Line_id_Node>1 </Line_id_Node>
    <A>
    <B>
    <D>Val1 </D>
    </B>
    <B>
    <D>Val2 </D>
    </B>
    <B>
    <D>Val3 </D>
    </B>
    </A>
    </Node1>
    <Node1>
    <Line_id_Node> 2 </Line_id_Node>
    <A>
    <B>
    <D>Val4 </D>
    </B>
    <B>
    <D>Val2 </D>
    </B>
    </A>
    </Node1>
    <Node1>
    <Line_id_Node> 3 </Line_id_Node>
    <A>
    <B>
    <D>Val5 </D>
    </B>
    </A>
    </Node1>
    </RootNode>
    Expected O/P:
    Line_id_Node                Column_D
    1                                                                    1                                           
    val1, val2, val3
    2                                                                    2                                               
    val4, val2
    3                                                                    3                                                  
    val5
    Nichesl

  • Error while parsing or executing XML-SQL document

    friends,
    my scenario is based on file to jdbc.i am facing  an error in receiver CC in RWB.
    The error states that '
    Error while parsing or executing XML-SQL document: Error processing request in sax parser: Error when executing statement for table/stored proc. 'MATMAS' (structure 'STATEMENT'): java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]String or binary data would be truncated.'
    My SOAP xml message is
    - <SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
    - <SOAP:Header>
    - <sap:Main xmlns:sap="http://sap.com/xi/XI/Message/30" versionMajor="3" versionMinor="0" SOAP:mustUnderstand="1" xmlns:wsu="http://www.docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="wsuid-main-92ABE13F5C59AB7FE10000000A1551F7">
      <sap:MessageClass>ApplicationMessage</sap:MessageClass>
      <sap:ProcessingMode>asynchronous</sap:ProcessingMode>
      <sap:MessageId>18f17dd0-d503-11dc-cb4d-001635b02bfd</sap:MessageId>
      <sap:TimeSent>2008-02-06T22:30:21Z</sap:TimeSent>
    - <sap:Sender>
      <sap:Party agency="http://sap.com/xi/XI" scheme="XIParty" />
      <sap:Service>ECC</sap:Service>
      </sap:Sender>
    - <sap:Receiver>
      <sap:Party agency="http://sap.com/xi/XI" scheme="XIParty" />
      <sap:Service>BS_JDBC</sap:Service>
      </sap:Receiver>
      <sap:Interface namespace="http://file_to_jdbc">MI_JDBC_RECEIVER</sap:Interface>
      </sap:Main>
    - <sap:ReliableMessaging xmlns:sap="http://sap.com/xi/XI/Message/30" SOAP:mustUnderstand="1">
      <sap:QualityOfService>ExactlyOnce</sap:QualityOfService>
      </sap:ReliableMessaging>
    - <sap:DynamicConfiguration xmlns:sap="http://sap.com/xi/XI/Message/30" SOAP:mustUnderstand="1">
      <sap:Record namespace="http://sap.com/xi/XI/System/File" name="Directory">
    sapecc50\sapmnt\trans</sap:Record>
      <sap:Record namespace="http://sap.com/xi/XI/System/File" name="FileEncoding">UTF-8</sap:Record>
      <sap:Record namespace="http://sap.com/xi/XI/System/File" name="FileType">txt</sap:Record>
      <sap:Record namespace="http://sap.com/xi/XI/System/File" name="FileName">matmas1.txt</sap:Record>
      </sap:DynamicConfiguration>
    - <sap:HopList xmlns:sap="http://sap.com/xi/XI/Message/30" SOAP:mustUnderstand="1">
    - <sap:Hop timeStamp="2008-02-06T22:30:21Z" wasRead="false">
      <sap:Engine type="AE">af.e6e.sapecc6eval</sap:Engine>
      <sap:Adapter namespace="http://sap.com/xi/XI/System">XIRA</sap:Adapter>
      <sap:MessageId>18f17dd0-d503-11dc-cb4d-001635b02bfd</sap:MessageId>
      <sap:Info />
      </sap:Hop>
    - <sap:Hop timeStamp="2008-02-06T22:30:21Z" wasRead="false">
      <sap:Engine type="IS">is.01.sapecc6eval</sap:Engine>
      <sap:Adapter namespace="http://sap.com/xi/XI/System">XI</sap:Adapter>
      <sap:MessageId>18f17dd0-d503-11dc-cb4d-001635b02bfd</sap:MessageId>
      <sap:Info>3.0</sap:Info>
      </sap:Hop>
    - <sap:Hop timeStamp="2008-02-06T22:30:22Z" wasRead="false">
      <sap:Engine type="AE">af.e6e.sapecc6eval</sap:Engine>
      <sap:Adapter namespace="http://sap.com/xi/XI/System">XIRA</sap:Adapter>
      <sap:MessageId>18f17dd0-d503-11dc-cb4d-001635b02bfd</sap:MessageId>
      </sap:Hop>
      </sap:HopList>
    - <sap:Diagnostic xmlns:sap="http://sap.com/xi/XI/Message/30" SOAP:mustUnderstand="1">
      <sap:TraceLevel>Information</sap:TraceLevel>
      <sap:Logging>Off</sap:Logging>
      </sap:Diagnostic>
      </SOAP:Header>
    - <SOAP:Body>
    - <sap:Manifest xmlns:sap="http://sap.com/xi/XI/Message/30" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:wsu="http://www.docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="wsuid-manifest-5CABE13F5C59AB7FE10000000A1551F7">
    - <sap:Payload xlink:type="simple" xlink:href="cid:[email protected]">
      <sap:Name>MainDocument</sap:Name>
      <sap:Description />
      <sap:Type>Application</sap:Type>
      </sap:Payload>
      </sap:Manifest>
      </SOAP:Body>
      </SOAP:Envelope>
    and payload message is
    <?xml version="1.0" encoding="UTF-8" ?>
    - <ns0:MT_JDBC_RECEIVER xmlns:ns0="http://file_to_jdbc">
    - <STATEMENT>
    - <ROW action="INSERT">
      <TABLE>MATMAS</TABLE>
    - <access>
      <MATNR>38</MATNR>
      <MTART>HALB</MTART>
      <MATKL>00107</MATKL>
      <MEINS>pc</MEINS>
      <ERSDA>2008.04.05</ERSDA>
      <BRGEW>10</BRGEW>
      <NTGEW>12</NTGEW>
      <GEWEI>KG</GEWEI>
      </access>
    - <access>
      <MATNR>88</MATNR>
      <MTART>FERT</MTART>
      <MATKL>02004</MATKL>
      <MEINS>PC</MEINS>
      <ERSDA>2008.04.05</ERSDA>
      <BRGEW>12</BRGEW>
      <NTGEW>13</NTGEW>
      <GEWEI>KG</GEWEI>
      </access>
    - <access>
      <MATNR>89</MATNR>
      <MTART>FERT</MTART>
      <MATKL>02004</MATKL>
      <MEINS>PC</MEINS>
      <ERSDA>2008.03.02</ERSDA>
      <BRGEW>12</BRGEW>
      <NTGEW>14</NTGEW>
      <GEWEI>KG</GEWEI>
      </access>
    - <access>
      <MATNR>98</MATNR>
      <MTART>HALB</MTART>
      <MATKL>2</MATKL>
      <MEINS>PC</MEINS>
      <ERSDA>2006.09.01</ERSDA>
      <BRGEW>12</BRGEW>
      <NTGEW>12</NTGEW>
      <GEWEI>KG</GEWEI>
      </access>
    - <access>
      <MATNR>170</MATNR>
      <MTART>NLAG</MTART>
      <MATKL>4</MATKL>
      <MEINS>PC</MEINS>
      <ERSDA>2005.03.02</ERSDA>
      <BRGEW>2</BRGEW>
      <NTGEW>3</NTGEW>
      <GEWEI>KG</GEWEI>
      </access>
    - <access>
      <MATNR>178</MATNR>
      <MTART>NLAG</MTART>
      <MATKL>4</MATKL>
      <MEINS>PC</MEINS>
      <ERSDA>2007.03.06</ERSDA>
      <BRGEW>3</BRGEW>
      <NTGEW>4</NTGEW>
      <GEWEI>KG</GEWEI>
      </access>
    - <access>
      <MATNR>188</MATNR>
      <MTART>NLAG</MTART>
      <MATKL>5</MATKL>
      <MEINS>PC</MEINS>
      <ERSDA>2007.05.02</ERSDA>
      <BRGEW>2</BRGEW>
      <NTGEW>3</NTGEW>
      <GEWEI>KG</GEWEI>
      </access>
    - <access>
      <MATNR>288</MATNR>
      <MTART>HALB</MTART>
      <MATKL>101</MATKL>
      <MEINS>PC</MEINS>
      <ERSDA>2006.02.11</ERSDA>
      <BRGEW>5</BRGEW>
      <NTGEW>4</NTGEW>
      <GEWEI>KG</GEWEI>
      </access>
    - <access>
      <MATNR>358</MATNR>
      <MTART>HAWA</MTART>
      <MATKL>2</MATKL>
      <MEINS>PC</MEINS>
      <ERSDA>2007.09.09</ERSDA>
      <BRGEW>500</BRGEW>
      <NTGEW>500</NTGEW>
      <GEWEI>G</GEWEI>
      </access>
    - <access>
      <MATNR>359</MATNR>
      <MTART>HAWA</MTART>
      <MATKL>2</MATKL>
      <MEINS>PC</MEINS>
      <ERSDA>2007.08.01</ERSDA>
      <BRGEW>20</BRGEW>
      <NTGEW>10</NTGEW>
      <GEWEI>G</GEWEI>
      </access>
      </ROW>
      </STATEMENT>
      </ns0:MT_JDBC_RECEIVER>
    Could anybody help me in sorting out this issue.My advance thanks

    hi,
    ypur structure is bad defined.
    if you want to do an insert, the DT should be
    <ns0:MT_JDBC_RECEIVER xmlns:ns0="http://file_to_jdbc">
    ___<StatementName>
    ______<dbTableName action=”INSERT”>
    _____<table>MATMAS</table>
    _______ <access>
    ___________<MATNR>38</MATNR>
    ___________<MTART>HALB</MTART>
    ___________<MATKL>00107</MATKL>
    ___________<MEINS>pc</MEINS>
    ___________<ERSDA>2008.04.05</ERSDA>
    ___________<BRGEW>10</BRGEW>
    ___________<NTGEW>12</NTGEW>
    ___________<GEWEI>KG</GEWEI>
    ______</access>
    _____</dbTableName>
    __ </StatementName>
    </ns0:MT_JDBC_RECEIVER>
    the ROW field is used when you wait receive data from DB for example you execute and SQL Query from Sender communication channel "SELECT name FROM TABLE Names"
    so, the result of this query would be, for example:
    <row>
    ____<name>joge</name>
    </row>
    <row>
    ____<name>pepe</name>
    </row>
    <row>
    ____<name>nicola</name>
    </row>
    See this link
    http://help.sap.com/saphelp_nw04/helpdata/en/2e/96fd3f2d14e869e10000000a155106/frameset.htm
    Thanks
    Rodrigo
    Edited by: Rodrigo Pertierra on Feb 8, 2008 8:40 AM
    Edited by: Rodrigo Pertierra on Feb 8, 2008 8:42 AM

  • Can you run multiple APEX listeners for different instances on the same server

    Please confirm that we can run multiple APEX listeners for different instances on the same server?  Is it an xml setup configuration or do we need to do more??
    Thank You,
    Tony Miller
    SmartDog Services
    Austin, TX

    Yes.. Just exactly what I was looking for...
    Thanks Jari!!
    Thank You,
    Tony Miller
    SmartDog Services
    Austin, TX

  • Oracle.xml.sql.OracleXMLSQLException when using OracleXMLQuery getXMLDOM()

    Hi!
    I am trying to reuse a code in JDeveloper to get XML from a query. I have copied the code from a method and created a new method with the copied code and changed it. The problem is that when I run the old code I now get following error:
    Ett oförväntat fel har inträffat: Application: FND, Message Name: FND_GENERIC_MESSAGE.
    Tokens: MESSAGE = oracle.xml.sql.OracleXMLSQLException: Det här objektet har stängts.
    Vill du inte att objektet ska stängas automatiskt mellan anropen kan du granska metoden 'keepObjectOpen()'.;
    This means in english something like:
    An unexpected error accoured: Application: FND, Message Name: FND_GENERIC_MESSAGE = oracle.xml.sql.OracleXMLSQLException: This object is closed. If you don't want the object to close automatically between calls you can check method 'keepObjectOpen()';
    the code I'm running is:
    public String punchoutSomething()
    throws Exception
    StringBuffer sqlForXml =new StringBuffer("select pv.*"
    +", cursor(select * from XXPOS_PUNCHOUT_TABLE2 c where c.vendor_id=pv.vendor_id) as contacts"
    +" from XXPOS_PUNCHOUT_TABLE1 pv where vendor_id in (");
    // add all ids
    SuppSummVOImpl vendorView = getSuppSummVO();
    Row row;
    int punchoutCnt=0;
    // vendorView.reset();
    Row[] selectedRows = vendorView.getFilteredRows("SelectStatus","Y");
    for(int i=0;i<selectedRows.length;i++)
    if(punchoutCnt>0)
    sqlForXml.append(",");
    sqlForXml.append(((Number)selectedRows.getAttribute("VendorId")).toString());
    punchoutCnt++;
    if(punchoutCnt==0)
    sqlForXml.append("-1"); // make sql valid, will not return rows
    sqlForXml.append(")");
    // System.out.println(sqlForXml); // DEBUG
    OADBTransaction tx = (OADBTransaction)getOADBTransaction();
    OracleXMLQuery xq = new OracleXMLQuery( tx.getJdbcConnection()
    , sqlForXml.toString()
    xq.setRaiseException(true); // in case of error raise an exception (default
    // is to generate an error document
    xq.setEncoding("UTF-8"); // not necessary?
    xq.useLowerCaseTagNames();
    xq.setRowsetTag("vendors");
    xq.setRowTag("vendors_row");
    //System.out.println(xq.getXMLString()); // DEBUG
    XMLDocument suppl = (XMLDocument)xq.getXMLDOM();
    XSLProcessor xslt = new XSLProcessor();
    InputStream sheetStream = this.getClass().getResourceAsStream("mystylesheet.xsl");
    if(sheetStream==null)
    throw new Exception("Could not load stylesheet");
    XSLStylesheet sheet = xslt.newXSLStylesheet(
    sheetStream
    StringWriter serialize = new StringWriter();
    xslt.processXSL(sheet,suppl,new PrintWriter(serialize));
    String returnXML = serialize.getBuffer().toString();
    // System.out.println("X:"+returnXML); // DEBUG
    sheetStream.close();
    return returnXML;
    ===================
    i've copied the same code into another method and only changed the sql-statment to be used and the stylesheet to use to transform the xml. Is something wrong with that?
    Another question: if the xsl refers to a xsd but wihtout any path where should it be?
    Thanks for the help,
    Patricia

    Actually, having looked at Metalink, seems that although this message may be accurate and correct,
    it has been 'introduced' as part of the 9i JDBC driver.
    So, I used the 8i JDBC driver I happened to have instead and that worked fine.

  • 1.2 JVM crashes using XML SQL Utility 1.1.10 (NT 8.1.5)

    I am trying to use the XML SQL Utility for Java (Oracle 8.1.5) to obtain a DTD or XML schema for tables in our database.
    I have installed the XSU111.ZIP archive,
    set the CLASSPATH and stuff, loaded the JAR
    files (xmlparserv2.jar, oraclexmlsql.jar)
    processed the xmlgenpkg.sql script (following the installation instructions)
    When I execute the samples in Java, the JVM (JDK 1.2.2) crashes in javai.dll.
    The same error occurs when I run java OracleXML getXML ....
    The installation file (env.bat) lists the JDBC driver ZIP as CLASSES12.ZIP, which is of course, not available for 8.1.5, which is what the download instructions indicated is appropriate for XSU 1.1.1.
    Any ideas? Do I need to upgrade to 8.1.6?
    Can I patch the JDBC with classes12.ZIP.
    By the way, when I execute the commands in PL/SQL using xmlgen package, everything is fine.
    Regards and Much thanks

    Set JDK_HOME to the directory where you install your JDK (Java Development Kit).
    So instance, I've install JDK1.1.8 on my
    C drive so
    set JDK_HOME=c:\jdk1.1.8;c:\jdk1.1.8\bin

  • Message Mapping Nested Structure to key node in JDBC XML SQL Structure

    Hello everybody,
    I'm facing the next problem, I have the following nested structure
    <ns0:MT_Irdoc_ArchivoNested xmlns:ns0="http://ref.pemex.com/PI/FI/ArchivoIrdoc">
       <Header id_consecutivo="">
          <Transaction/>
          <Header2/>
          <Header3/>
          <Header4/>
          <Header5/>
          <Detail>
             <Transaction/>
             <Detail2/>
             <Detail3/>
             <Detail4/>
             <Detail5/>
          </Detail>
       </Header>
       <NombreArchivo/>
    </ns0:MT_Irdoc_ArchivoNested>
    as you can see, Detail is a nested Node from Header Node, and Detail is with occurrence 0...unbounded, I need to generate a SELECT XML SQL Structure as follows
       <StatementName>
              <dbTableName action=u201DSELECTu201D>
                  <table>realDbTableName</table>
                  <access>
                     <col1/>
                     <col2/>
                     <col3/>
                  </access>
                  <key1>
                     <col4>val4</col4>
                     <col5>val5</col5>
                     <col6>val6</col6>
                  </key1>
              </dbTableName> 
       </StatementName>
    now my problem is that col4 and col6 are values mapped from Header fields values, and col5 mus be mapped from Detail2 field of Detail Nested Structure, and Detail is 0...unbounded so it can contain any number of values and must included in the key structure, I tried by mapping the Detail Node to the key1 node, so it will generate n numbers of key1 nodes to include in the query, and the Detail number of nodes are not constant so I can't generate key2, key3, keyn...., so what I need is to create n numbers of instances of key1 node, but the problem is that when the mapping try to generate the second instance of key1 node it gives an error in the fields that comes from Header structure, maybe I'm trying to solve my problem wrong, could anyone give some advices or direction?, thanks in advance.
    Regards,
    Julio Cesar

    Julio,
    After placing the below logic in the mapping editor
    Details2 > SplitByValue> col5
    Right click on the Details2 node and choose Context. By Default you will see Details, because Details2 is the child of Details node. I want you to choose the Parent of Details node, I believe that would be HeaderID, am I right?
    If you don't want to do that then,
    Details2 ---> Remove Context > SplitByvalue> col5 will do the trick!
    raj.

  • Help Needed -- Oracle XML/SQL utility and PL/SQL parser

    Let's say we have an xml file
    <?xml version="1.0" standalone="no"?>
    <abc>
    <def>
    <ghi>test</ghi>
    </def>
    <jkl>
    <mno>testing</mno>
    </jkl>
    </abc>
    We can store the <def> tag in one table say def and <jkl> tag in another table say jkl.
    Is there a way to combine def and jkl and insert in one table so that there in one row with two columns test and testing??
    null

    Hi,
    Are u sure that it is a java enabled database? The most common
    case of failure with the xmlgen package is because the loadjava
    command did not succeed.
    Please make sure that oraclexmlsqlload.bat file loaded all the
    java procedures successfully. If not then u would have to java-
    enable your database by running the initjvm script. (please see
    the docs).
    Thx
    Murali
    Iveta Vojtko (guest) wrote:
    : Hi,
    : I have downloaded XML SQL Utility for Java against Oracle
    8.0.5
    : on WindowsNT. The xmlgen package was created successfully but
    : its body is invalid and my PL/SQL test has failed because of
    : following error: PLS-00103: Encountered the symbol "NAME"
    : when expecting one of the following: := . ( @ % ; not null
    range
    : renames default character. The symbol ":= was inserted abefore
    : "NAME" to continue.
    : Is it because I am not using Oracle8i? I just want to use the
    : server side of XML SQL. Please, reply asap. Thank you.
    Oracle Technology Network
    http://technet.oracle.com
    null

  • Oracle.xml.sql.OracleXMLSQLException: Expected name instead of .

    Hi,
    I'm using XDK in Tomcat to execute queries and get the XML result in the browser. I have written many queries but now I'm having problems in one of them.
    The error output that I see in my browser is this one:
    <ROOT>
    <ERROR>
    oracle.xml.sql.OracleXMLSQLException: Expected name instead of <.
    </ERROR>
    </ROOT>:
    This error message is known as XML-20126 but it's not documented in the XML Developer's Kit Programmer's Guide, so I don't know what to do.
    My XSQL query is the following:
    <ROOT connection="xxxx_read" xmlns:xsql="urn:oracle-xsql">
    <xsql:query>
    SELECT XMLAGG(XMLELEMENT("NODE",
    XMLELEMENT("name", b.nodename),
    (SELECT XMLAGG(XMLELEMENT("SERVICE",
    XMLATTRIBUTES(a.serviceabbr AS "type")
    ORDER BY a.serviceabbr
    FROM service a, serviceinstance c
    WHERE c.isdeleted='N'
    AND a.serviceid=c.serviceid
    AND c.nodeid=b.nodeid
    ORDER BY b.nodename
    ) AS "NODES"
    FROM node b
    WHERE b.isdeleted='N'
    </xsql:query>
    </ROOT>
    That query executes fine in sqlplus, where I can see the XML result.
    I think my problem could be related to the size of the XML output. In sqlplus, the output has around 38000 bytes size, which is nothing, so I don't really know why that should be a problem. Do you have any idea?
    Thanks for your help,
    David

    So it seems there is a problem in fact:
    XDB FUNCTION RESULTS ARE TRUNCATED WHEN USING XSQL
    *** 02/25/04 08:28 am ***
    Problem Description
    There appears to be a limit on the content or characters that XSQL pages
    handle when being passed data from XDB functions such as XMLAGG() and
    XMLELEMENT().
    If you have a xsql page of the form
    < ?xml version="1.0"?>
    < xsql:query xmlns:xsql="urn:oracle-xsql" connection="demo" >
    select XMLAgg(XMLElement("Test", XMLAttributes(i.id as "Id_van_de_test",
    i.name as "Name_van_de_test"))) as "Tests" from problem_xml i
    < /xsql:query>
    If the number of rows (or amount of data) in the table is low, the result
    appears okay. However, if the data returned is large the data appears to
    truncate giving xml parsing errors as if the xml returned is not well formed.
    In the testcase provided, the error is as follows :-
    Results from 10.1.0.2
    < Line 2, Column 16354>: XML-20126: (Fatal Error) '< ' cannot appear in attribute value.
    < Line 2, Column 16366>: XML-20190: (Fatal Error) Whitespace required.
    < Line 2, Column 16366>: XML-20201: (Fatal Error) Expected name instead of 4.
    < ?xml version = '1.0'?>
    value.< /ERROR>
    Results from 9.2.0.6
    < Line 2, Column 16354>: XML-0126: (Fatal Error) '< ' cannot appear in attribute value.
    < Line 2, Column 16368>: XML-0190: (Fatal Error) Whitespace required.
    < Line 2, Column 16368>: XML-0201: (Fatal Error) Expected name instead of 3.
    < Line 2, Column 16371>: XML-0122: (Fatal Error) '=' missing in attribute.
    < Line 2, Column 16391>: XML-0190: (Fatal Error) Whitespace required.
    < Line 2, Column 16396>: XML-0122: (Fatal Error) '=' missing in attribute.
    < Line 2, Column 16397>: XML-0125: (Fatal Error) Attribute value should start with quote.
    < ?xml version = '1.0'?>
    value.< /ERROR>
    And the workaround:
    ======================================================
    The only workaround we have is to get the Document generated using
    DBMS_XMLQUERY [with expanded entities].
    _==Start===
    create or replace procedure Query2XML(QueryString varchar2 default
    'select col1 from xml_tab where r_id = ?') IS
    XMLCtx number;
    myXML clob;
    myXMLLength number;
    BEGIN
    XMLCtx := DBMS_XMLQUERY.NEWCONTEXT(QueryString);
    myXML := DBMS_XMLQUERY.GETXML(XMLCtx);
    myXMLLength := DBMS_LOB.GETLENGTH(myXML);
    DBMS_XMLQUERY.CLOSECONTEXT(XMLCtx);
    END Query2XMLFile;
    _==Start===
    Currently, XDB uses a DOM based model for XSLT evaluation. It is not
    possible to support disable-output-escaping constructs through this
    evaluation. This might be supported in a future release when a different
    model is implemented.
    =============================================================

  • XML SQL Utility, Unicode

    Hi,
    I have some questions to the XML-SQL-Utility:
    1.) Is there a bug in the oracle.xml.sql.query class:
    OracleXMLQuery qry = new OracleXMLQuery(conn,"select POSITION from DATAS");
    qry.setRowTag("DROW");
    OracleXMLDocGenDOM gdoc = new OracleXMLDocGenDOM();
    qry.getXML(gdoc);
    conn.close();
    Document docin = gdoc.getXMLDocumentDOM();
    NodeList rows = docin.getDocumentElement().getElementsByTagName("DROW");
    // The Node "DROW" wasn't found.
    // It work if I do it below
    NodeList rows = docin.getDocumentElement().getElementsByTagName("ROW");
    // It doesn't matter what is set in the "qry1.setRowTag("DROW");"
    (I use the sun parser)
    2.) I have a problem by insertXML(Document);
    I will insert a Document with a structure as below in my database:
    <?xml version="1.0" encoding="UTF-16"?>
    <ROOTDOC>
    <ROW>
    <DOCUMENTREF>133-12224</DOCUMENTREF>
    <TEXT>hello</TEXT>
    </ROW>
    <ROW>
    <DOCUMENTREF>133-124</DOCUMENTREF>
    <TEXT>world</TEXT>
    </ROW>
    </ROOTDOC>
    XmlDocument sdoc = new XmlDocument();
    Element rootDEl = sdoc.createElement("ROOTDOC");
    sdoc. appendChild(rootDEl);
    Element rowEl = sdoc.createElement("ROW");
    Element docREl = sdoc.createElement("DOCUMENTREF");
    docREl.appendChild(sdoc.createTextNode("133-12224"));
    NodeList rows = sdoc.getDocumentElement().getElementsByTagName("ROW");
    int size = rows.getLength();
    System.out.println("SIZE: " size "\n");
    // The size is null, what's wrong ?
    OracleXMLSave save = new OracleXMLSave(conn, tabName);
    int rowCount = save.insertXML(sdoc);
    // It didn't insert something in my table !
    3.) I save Unicode UTF-16 in my database with the XML SQL Utility:
    <?xml version="1.0" encoding="UTF-16"?>
    <ROOTDOC>
    <ROW>
    <TEXT>D$55DD</TEXT>
    </ROW>
    <ROW>
    <TEXT>tt%zu||</TEXT>
    If I read it whit the oracle.xml.sql.query, it is Unicode UTF-8:
    OUTPUT IS:
    <?xml version="1.0"?>
    <ROOTDOC>
    <ROW num="1">
    <TEXT>D$55--</TEXT>
    </ROW>
    <ROW num="2">
    <TEXT>tt%zu33</TEXT>
    </ROW>
    I want a output as the input (Unicode UTF-16).
    Can anyone please advise on the problems.
    Thanks
    null

    Hi H.Ozawa,
    thanks for trying but non of the solution helped me, sorry.
    Question 1:
    I'll try it again like this:
    OracleXMLQuery qry = new OracleXMLQuery(conn,"select POSITION from DATAS");
    qry.setRowTag("DROW");
    Document docin = qry.getXMLDOM();
    conn.close();
    NodeList rows = docin.getDocumentElement().getElementsByTagName("DROW");
    // The Node "DROW" wasn't found.
    Question 2:
    <?xml version="1.0" encoding="UTF-16"?>
    <ROOTDOC>
    <ROW>
    <DOCUMENTREF>133-12224</DOCUMENTREF>
    <TEXT>hello</TEXT>
    </ROW>
    <ROW>
    <DOCUMENTREF>133-124</DOCUMENTREF>
    <TEXT>world</TEXT>
    </ROW>
    </ROOTDOC>
    XmlDocument sdoc = new XmlDocument();
    Element rootDEl = sdoc.createElement("ROOTDOC");
    sdoc. appendChild(rootDEl);
    Element rowEl = sdoc.createElement("ROW");
    Element docREl = sdoc.createElement("DOCUMENTREF");
    docREl.appendChild(sdoc.createTextNode("133-12224"));
    Element docTEl = sdoc.createElement("TEXT");
    docTEl.appendChild(sdoc.createTextNode("hello"));
    An error message occur:
    java.lang.reflect.InvocationTargetException: java.lang.IllegalAccessError: try to access class com/sun/xml/tree/ParentNode from class project/dbase/xmlwritedb at project.dbase.xmlwritedb.main(xmlwritedb.java:33)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.borland.jbuilder.util.BootStrap.invokeMain(Unknown Source)
    at com.borland.jbuilder.util.BootStrap.main(Unknown Source)
    Question 3:
    I try it like below but the output is "UTF-8" encoding
    OracleXMLDocGenDOM gdoc = new OracleXMLDocGenDOM();
    query.getXML(gdoc);
    XMLDocument docin = (XMLDocument)gdoc.getXMLDocumentDOM();
    docin.setEncoding("ISO-8859-1"); //docin.setEncoding("UTF-16");
    NodeList rows = docin.getDocumentElement().getElementsByTagName("ROW");
    Element row = (Element)rows.item( i );
    NodeList elements = row.getElementsByTagName( "DOCUMENTREF" );
    So you or someone have another idea to fix this problems.
    Thanks
    null

  • XML SQL Utility - settagcase - all tags are upper or lower

    I am using the XML SQL Utility (XSU) for PL/SQL to generate a xml document from some tables and objects. Is it possible to have the xml elements start and end tags appear in the case of the objects I have defined (i.e. CamelCase)? I can either have them appear as all upper or all lower case. However the oracle documentation has a SETTAGCASE function with an option for "as are". Is this supposed to allow for the case to follow how i have defined the fields in the object? If not is there a way?
    For example here is an object
    create or replace TYPE     CREDIT_APPLICANTTYPE AS OBJECT
      First VARCHAR2(15 BYTE),
      Last  VARCHAR2(35 BYTE),
      Middle VARCHAR2(1 BYTE),
      Suffix VARCHAR2(3 BYTE)
    );Settagcase 0 option doesn't seem to do anything different than the upper_case option when i generate the xml
    http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_xmlque.htm#i1033636
    set serveroutput on
    declare
      queryCtx dbms_xmlquery.ctxType;
      charstring VARCHAR2(255);
      outxml CLOB;
    begin
        queryCtx := dbms_xmlquery.newContext('select CREDIT_APPLICANTTYPE(''Joe'',''Smith'',''A'',''Jr.'') as AppName from dual');
        dbms_xmlquery.settagcase(queryCtx, 0);
        outxml := dbms_xmlquery.getXml(queryCtx);
        dbms_xmlquery.closeContext(queryCtx);
        charstring := dbms_lob.substr(outxml, 255, 1);
        dbms_output.put_line(charString);
    end;Output is in uppercase but i would like camel case:
    <?xml version = '1.0'?>
    <ROWSET>
    <ROW num="1">
    <APPNAME>
    <FIRST>Joe</FIRST>
    <LAST>Smith</LAST>
    <MIDDLE>A</MIDDLE>
    <SUFFIX>Jr.</SUFFIX>
    </APPNAME>
    </ROW>
    </ROWSET>

    Actually I figured out the issue. Oracle automatically outputs the column alias as upper case unless you put it in quotes. I defined my object like this and it works with settagcase 0
    create or replace TYPE CREDIT_APPLICANTTYPE AS OBJECT
    "First" VARCHAR2(15 BYTE),
    "Last" VARCHAR2(35 BYTE),
    "Middle" VARCHAR2(1 BYTE),
    "Suffix" VARCHAR2(3 BYTE)
    );

Maybe you are looking for