Generating DTD with xsql:query

Is there any attribute to xsql:query to generate DTD for the result.

Hmm,
Even more confusing - the same .xsql document works fine with WebToGo - so I guess this is a Tomcat problem, somehow... Just can't understand why xsql:include-xsql works and xsql:query doesn't.
Steve

Similar Messages

  • Problem with xsql:query

    Hi,
    I'm having a problem with the following simple XSQL document:
    <?xml version="1.0"?>
    <xsql:query connection="xsqltest" xmlns:xsql="urn:oracle-xsql">
    SELECT concat(concat(forename, ' '), surname) AS Name
    , d.name AS Department
    FROM emp, dept d
    WHERE emp.dept_no = d.id
    ORDER BY surname
    </xsql:query>When I transform this using the command line xsql, it produces the following (as expected):
    <?xml version = '1.0'?>
    <ROWSET>
    <ROW num="1">
    <Name>Cindy Delight</Name>
    <Department>Accounting</Department>
    </ROW>
    <ROW num="2">
    <Name>Adrian Rue</Name>
    <Department>Product Development</Department>
    </ROW>
    <ROW num="3">
    <Name>Dwight Dweeb</Name>
    <Department>Accounting</Department>
    </ROW>
    </ROWSET>However, when I access the same page through my browser, the output is:
    <?xml version = '1.0'?>
    <xsql:query>
    SELECT concat(concat(forename, ' '), surname) AS Name
    , d.name AS Department
    FROM emp, dept d
    WHERE emp.dept_no = d.id
    ORDER BY surname
    </xsql:query>(this is the same as the input document, except the namespace declaration has been stripped out, making the XML invalid).
    I've tried including other xsql tags in the same document (e.g. xsql:include-xsql), these seem to work fine. Also, if I change the connect details, XSQL fails as expected, so it would appear xsql is being invoked by Tomcat (.xsql is mapped to the servlet), and XSQL successfully connecting to the database.
    My setup is slightly unusual: I'm trying to use XSQL 1.0.4.1 with MySQL 3.23.32 using the mm.mysql 2.0.4 JDBC drivers. This is running on Tomcat 3.2.1 with JDK 1.3 (OJVM 1.2.330). But, since it works with the command line xsql, I'm at a loss as to why it's misbehaving through the servlet engine only... any ideas?
    Steve

    Hmm,
    Even more confusing - the same .xsql document works fine with WebToGo - so I guess this is a Tomcat problem, somehow... Just can't understand why xsql:include-xsql works and xsql:query doesn't.
    Steve

  • Object types return hex characters with xsql:query

    How do I use xsql servlet to return an object which contains street address etc. as a character string and not a hexadecimal string. If I use the following ddl and implement the following xsql, I get the following results.
    CREATE TYPE address_objtyp AS object
    (street VARCHAR(30),city VARCHAR(30),state VARCHAR(2));
    CREATE SEQUENCE employees_seq START WITH 105 INCREMENT BY 1;
    CREATE TABLE employees(
    id NUMBER(4) CONSTRAINT emp_pkId PRIMARY KEY,
    first_name VARCHAR(30),
    last_name VARCHAR(30),
    address address_objtyp);
    INSERT INTO employees VALUES (
    103, 'Fred', 'Couples',
    address_objtyp('9201 Park St', 'Alexandria', 'VA'));
    <?xml version="1.0"?>
    <xsql:query null-indicator="yes" connection="demo"
    allow-client-style="yes" xmlns:xsql="urn:oracle-xsql">
    select * from employees
    </xsql:query>
    <?xml version="1.0" ?>
    - <ROWSET xsql-timing="20">
    - <ROW num="1">
    <ID>103</ID>
    <FIRST_NAME>Fred</FIRST_NAME>
    <LAST_NAME>Couples</LAST_NAME>
    - <ADDRESS>
    <STREET>0x39323031205061726B205374</STREET>
    <CITY>0x416C6578616E64726961</CITY>
    <STATE>0x5641</STATE>
    </ADDRESS>
    </ROW>
    </ROWSET>
    I'm using the most recent jdbc thin driver (ojdbc14.jar) that is for jdk 1.4. I'm using a 9.0.1 db, and I'm using xdk for java 9.2.0.3. So I thought that the thin driver is not capable, so I tried the oci driver, and find another set of problems.
    I get the following error:
    Oracle XDK Java 9.2.0.3.0 Production
    XSQL-017: Unexpected Error Occurred
    java.lang.UnsatisfiedLinkError: no ocijdbc8 in java.library.path
    Now why does XDK insist to look for ocijdbc8 if I only have ocijdbc9.dll installed on my client? The config file only allows oci8 in the dburl specification, which is probably why XDK insists to look for ocijdbc8, but I CANNOT specify oci9, which would make sense to me, although it's most likely not a valid specification.
    <connection name="9ic">
    <username>scott</username>
    <password>tiger</password>
    <dburl>jdbc:oracle:oci8:@</dburl>
    <driver>oracle.jdbc.OracleDriver</driver>
    <autocommit>true</autocommit>
    </connection>
    And lastly documentation that comes with ojdbc14.jar indicates to now use a different specification for the jdbc thin driver. Instead of the usual
    <dburl>jdbc:oracle:thin:@host:port:sid</dburl>
    it recommends
    <dburl>jdbc:oracle:thin:@//host:port/service</dburl>
    however this does not work with XDK 9.2.0.3. Any ideas why not?
    By the way if I use SQL*Plus and select * from employees, I get the desired result in SQL*Plus, which suggests to me that I DO need the oci driver for XSQL Servlet. So how do I get XSQL Servlet 9.2.0.3 to use the oci 9 driver. I know how to set wrapper.path in the servlet config file to find ocijdbc9.dll, but XSQL Servlet still wants to find ocijdbc8.
    I sense that there is a bug hidden somewhere in the XDK kit.
    Steve.

    How do I use xsql servlet to return an object which contains street address etc. as a character string and not a hexadecimal string. If I use the following ddl and implement the following xsql, I get the following results.
    CREATE TYPE address_objtyp AS object
    (street VARCHAR(30),city VARCHAR(30),state VARCHAR(2));
    CREATE SEQUENCE employees_seq START WITH 105 INCREMENT BY 1;
    CREATE TABLE employees(
    id NUMBER(4) CONSTRAINT emp_pkId PRIMARY KEY,
    first_name VARCHAR(30),
    last_name VARCHAR(30),
    address address_objtyp);
    INSERT INTO employees VALUES (
    103, 'Fred', 'Couples',
    address_objtyp('9201 Park St', 'Alexandria', 'VA'));
    <?xml version="1.0"?>
    <xsql:query null-indicator="yes" connection="demo"
    allow-client-style="yes" xmlns:xsql="urn:oracle-xsql">
    select * from employees
    </xsql:query>
    <?xml version="1.0" ?>
    - <ROWSET xsql-timing="20">
    - <ROW num="1">
    <ID>103</ID>
    <FIRST_NAME>Fred</FIRST_NAME>
    <LAST_NAME>Couples</LAST_NAME>
    - <ADDRESS>
    <STREET>0x39323031205061726B205374</STREET>
    <CITY>0x416C6578616E64726961</CITY>
    <STATE>0x5641</STATE>
    </ADDRESS>
    </ROW>
    </ROWSET>
    I'm using the most recent jdbc thin driver (ojdbc14.jar) that is for jdk 1.4. I'm using a 9.0.1 db, and I'm using xdk for java 9.2.0.3. So I thought that the thin driver is not capable, so I tried the oci driver, and find another set of problems.
    I get the following error:
    Oracle XDK Java 9.2.0.3.0 Production
    XSQL-017: Unexpected Error Occurred
    java.lang.UnsatisfiedLinkError: no ocijdbc8 in java.library.path
    Now why does XDK insist to look for ocijdbc8 if I only have ocijdbc9.dll installed on my client? The config file only allows oci8 in the dburl specification, which is probably why XDK insists to look for ocijdbc8, but I CANNOT specify oci9, which would make sense to me, although it's most likely not a valid specification.
    <connection name="9ic">
    <username>scott</username>
    <password>tiger</password>
    <dburl>jdbc:oracle:oci8:@</dburl>
    <driver>oracle.jdbc.OracleDriver</driver>
    <autocommit>true</autocommit>
    </connection>
    And lastly documentation that comes with ojdbc14.jar indicates to now use a different specification for the jdbc thin driver. Instead of the usual
    <dburl>jdbc:oracle:thin:@host:port:sid</dburl>
    it recommends
    <dburl>jdbc:oracle:thin:@//host:port/service</dburl>
    however this does not work with XDK 9.2.0.3. Any ideas why not?
    By the way if I use SQL*Plus and select * from employees, I get the desired result in SQL*Plus, which suggests to me that I DO need the oci driver for XSQL Servlet. So how do I get XSQL Servlet 9.2.0.3 to use the oci 9 driver. I know how to set wrapper.path in the servlet config file to find ocijdbc9.dll, but XSQL Servlet still wants to find ocijdbc8.
    I sense that there is a bug hidden somewhere in the XDK kit.
    Steve.

  • XMLElement not returning XML with xsql:query

    I am trying to use a select statement containing XMLElement, XMLAgg and XMLForest functions from a xsql servlet.
    <page xmlns:xsql="urn:oracle-xsql" connection="HOM_WISP">
    <xsql:query row-element=""     rowset-element="STATEMENT">
    SELECT
    XMLElement("GROUP", XMLAttributes(gst_group AS GSTGroup,
    display_group AS DisplayGroup),
    XMLAgg(
    XMLElement("PAYMENTDETAIL",
    XMLForest(phase_type,
    contract_num,
    mark_block,
    cut_permit,
    destination,
    stratum_code,
    species_code,
    sort_code,
    truck,
    back_haul,
    uom_desc,
    uom_code,
    gst_exempt_flag,
    pay_deduct_desc,
    actual_rate,
    gst_registrant_num,
    load_count,
    quantity,
    volume,
    earnings)))).getClobVal() as PAYMENTITEM
    FROM ws_cntr_statement_vw
    GROUP BY gst_group, display_group
    </xsql:query>
    </page>
    When XML is returned only the out most XML as follows the inner elements are text. I truncated the output but you can see that GROUP and PAYMENTDETAIL are not elements but text. I want them all to be elements.
    <page>
    <STATEMENT><PAYMENTITEM>&lt;GROUP GSTGROUP="1_GST" DISPLAYGROUP="2_RETRO">&lt;PAYMENTDETAIL>&lt;PHASE_TYPE>Purchasing&lt;/PHASE_TYPE>&lt;CONTRACT_NUM>3346&lt;/CONTRACT_NUM>&lt;MARK_BLOCK>GA500B-0001&lt;/MARK_BLOCK>&lt;DESTINATION>LC&lt;/DESTINATION>&lt;STRATUM_CODE>18&lt;/STRATUM_CODE>&lt;SPECIES_CODE>SP&lt;/SPECIES_CODE>&lt;UOM_DESC>tonne&lt;/UOM_DESC>&lt;UOM_CODE>MT&lt;/UOM_CODE>&lt;GST_EXEMPT_FLAG>0&lt;/GST_EXEMPT_FLAG>&lt;ACTUAL_RATE>-9.32&lt;/ACTUAL_RATE>&lt;GST_REGISTRANT_NUM>R102090347&lt;/GST_REGISTRANT_NUM>&lt;LOAD_COUNT>1&lt;/LOAD_COUNT>&lt;QUANTITY>28440&lt;/QUANTITY>&lt;VOLUME>36.68&lt;/VOLUME>&lt;EARNINGS>-265.06&lt;/EARNINGS>&lt;/PAYMENTDETAIL>&lt;/GROUP></PAYMENTITEM><PAYMENTITEM>&lt;GROUP GSTGROUP="1_GST" DISPLAYGROUP="4_CNTRPAY">&lt;PAYMENTDETAIL>&lt;PHASE_TYPE>ADV/REC NO CONTRACT&lt;/PHASE_TYPE>&lt;UOM_DESC>flat&lt;/UOM_DESC>&lt;UOM_CODE>FL&lt;/UOM_CODE>&lt;GST_EXEMPT_FLAG>0&lt;/GST_EXEMPT_FLAG>&lt;PAY_DEDUCT_DESC>PAY 12 ADVANCE RECOVERY ES4922&lt;/PAY_DEDUCT_DESC>&lt;ACTUAL_RATE>32644.87&lt;/ACTUAL_RATE>&lt;GST_REGISTRANT_NUM>R123330532&lt;/GST_REGISTRANT_NUM>&lt;EARNINGS>-32644.87&lt;/EARNINGS>&lt;/PAYMENTDETAIL>&lt;PAYMENTDETAIL>&lt;PHASE_TYPE>FIREWOOD/STUMPAGE ALL BLOCKS&lt;/PHASE_TYPE>&lt;UOM_DESC>flat&lt;/UOM_DESC>&lt;UOM_CODE>FL&lt;/UOM_CODE>&lt;GST_EXEMPT_FLAG>0&lt;/GST_EXEMPT_FLAG>&lt;PAY_DEDUCT_DESC>FIREWOOD LOAD # 151819&lt;/PAY_DEDUCT_DESC>&lt;ACTUAL_RATE>25&lt;/ACTUAL_RATE>&lt;GST_REGISTRANT_NUM>R123083735&lt;/GST_REGISTRANT_NUM>&lt;EARNINGS>-25&lt;/EARNINGS>&lt;/PAYMENTDETAIL>&lt;PAYMENTDETAIL>&lt;PHASE_TYPE>SB#2 PAY RD USE&lt;/PHASE_TYPE>&lt;UOM_DESC>flat&lt;/UOM_DESC>&lt;UOM_CODE>FL&lt;/UOM_CODE>&lt;GST_EXEMPT_FLAG>1&lt;/GST_EXEMPT_FLAG>&lt;PAY_DEDUCT_DESC>ROAD USE ES4208 BLOCK 9&lt;/PAY_DEDUCT_DESC>&lt;ACTUAL_RATE>898.1&lt;/ACTUAL_RATE>&lt;EARNINGS>898.1&lt;/EARNINGS>&lt;/PAYMENTDETAIL>&lt;/GROUP></PAYMENTITEM><PAYMENTITEM>&lt;GROUP GSTGROUP="1_GST" DISPLAYGROUP="1_ORIGINAL">&lt;PAYMENTDETAIL>&lt;PHASE_TYPE>Logging&lt;/PHASE_TYPE>&lt;CONTRACT_NUM>2731&lt;/CONTRACT_NUM>&lt;MARK_BLOCK>ES4334-0026&lt;/MARK_BLOCK>&lt;CUT_PERMIT>334&lt;/CUT_PERMIT>&lt;DESTINATION>FED&lt;/DESTINATION>&lt;STRATUM_CODE>01&lt;/STRATUM_CODE>&lt;SPECIES_CODE>FI&lt;/SPECIES_CODE>&lt;UOM_DESC>tonne&lt;/UOM_DESC>&lt;UOM_CODE>MT&lt;/UOM_CODE>&lt;GST_EXEMPT_FLAG>0&lt;/GST_EXEMPT_FLAG>&lt;ACTUAL_RATE>19.5&lt;/ACTUAL_RATE>&lt;GST_REGISTRANT_NUM>R104985114&lt;/GST_REGISTRANT_NUM>&lt;LOAD_COUNT>14&lt;/LOAD_COUNT>&lt;QUANTITY>498300&lt;/QUANTITY>&lt;VOLUME>579.54&lt;/VOLUME>&lt;EARNINGS>9716.85&lt;/EARNINGS>&lt;/PAYMENTDETAIL>&lt;PAYMENTDETAIL>&lt;PHASE_TYPE>Logging&lt;/PHASE_TYPE>&lt;CONTRACT_NUM>2731&lt;/CONTRACT_NUM>&lt;MARK_BLOCK>ES4334-0026&lt;/MARK_BLOCK>&lt;CUT_PERMIT>334&lt;/CUT_PERMIT>&lt;DESTINATION>LC&lt;/DESTINATION>&lt;STRATUM_CODE>06&lt;/STRATUM_CODE>&lt;SPECIES_CODE>FI&lt;/SPECIES_CODE>&lt;UOM_DESC>tonne&lt;/UOM_DESC>&lt;UOM_CODE>MT&lt;/UOM_CODE>&lt;GST_EXEMPT_FLAG>0&lt;/GST_EXEMPT_FLAG>&lt;ACTUAL_RATE>19.5&lt;/ACTUAL_RATE>&lt;GST_REGISTRANT_NUM>R104985114&lt;/GST_REGISTRANT_NUM>&lt;LOAD_COUNT>33&lt;/LOAD_COUNT>&lt;QUANTITY>1096770&lt;/QUANTITY>&lt;VOLUME>1300.24&lt;/VOLUME>&lt;EARNINGS>21387.07&lt;/EARNINGS>&lt;/PAYMENTDETAIL>&lt;PAYMENTDETAIL>&lt;PHASE_TYPE>Logging&lt;/PHASE_TYPE>&lt;CONTRACT_NUM>2731&lt;/CONTRACT_NUM>&lt;MARK_BLOCK>ES4334-0026&lt;/MARK_BLOCK>&lt;CUT_PERMIT>334&lt;/CUT_PERMIT>&lt;DESTINATION>LC&lt;/DESTINATION>&lt;STRATUM_CODE>13&lt;/STRATUM_CODE>&lt;SPECIES_CODE>LO&lt;/SPECIES_CODE>&lt;UOM_DESC>tonne&lt;/UOM_DESC>&lt;UOM_CODE>MT&lt;/UOM_CODE>&lt;GST_EXEMPT_FLAG>0&lt;/GST_EXEMPT_FLAG>&lt;ACTUAL_RATE>19.5&lt;/ACTUAL_RATE>&lt;GST_REGISTRANT_NUM>R104985114&lt;/GST_REGISTRANT_NUM>&lt;LOAD_COUNT>84&lt;/LOAD_COUNT>&lt;QUANTITY>3219510&lt;/QUANTITY>&lt;VOLUME>3990.95&lt;/VOLUME>&lt;EARNINGS>62780.68&lt;/EARNINGS>&lt;/PAYMENTDETAIL>&lt;PAYMENTDETAIL>&lt;PHASE_TYPE>Logging&lt;/PHASE_TYPE>&lt;CONTRACT_NUM>2731&lt;/CONTRACT_NUM>&lt;MARK_BLOCK>ES4334-0026&lt;/MARK_BLOCK>&lt;CUT_PERMIT>334&lt;/CUT_PERMIT>&lt;DESTINATION>LC&lt;/DESTINATION>&lt;STRATUM_CODE>21&lt;/STRATUM_CODE>&lt;SPECIES_CODE>MX&lt;/SPECIES_CODE>&lt;UOM_DESC>tonne&lt;/UOM_DESC>&lt;UOM_CODE>MT&lt;/UOM_CODE>&lt;GST_EXEMPT_FLAG>0&lt;/GST_EXEMPT_FLAG>&lt;ACTUAL_RATE>19.5&lt;/ACTUAL_RATE>&lt;GST_REGISTRANT_NUM>R104985114&lt;/GST_REGISTRANT_NUM>&lt;LOAD_COUNT>2&lt;/LOAD_COUNT>&lt;QUANTITY>71030&lt;/QUANTITY>&lt;VOLUME>91.4&lt;/VOLUME>&lt;EARNINGS>1385.09&lt;/EARNINGS>&lt;/PAYMENTDETAIL>&lt;PAYMENTDETAIL>&lt;PHASE_TYPE>Logging&lt;/PHASE_TYPE>&lt;CONTRACT_NUM>2731&lt;/CONTRACT_NUM>&lt;MARK_BLOCK>ES4334-0026&lt;/MARK_BLOCK>&lt;CUT_PERMIT>334&lt;/CUT_PERMIT>&lt;DESTINATION>PUL&lt;/DESTINATION>&lt;STRATUM_CODE>16&lt;/STRATUM_CODE>&lt;SPECIES_CODE>LO&lt;/SPECIES_CODE>&lt;UOM_DESC>tonne&lt;/UOM_DESC>&lt;UOM_CODE>MT&lt;/UOM_CODE>&lt;GST_EXEMPT_FLAG>0&lt;/GST_EXEMPT_FLAG>&lt;ACTUAL_RATE>18&lt;/ACTUAL_RATE>&lt;GST_REGISTRANT_NUM>R104985114&lt;/GST_REGISTRANT_NUM>&lt;LOAD_COUNT>3&lt;/LOAD_COUNT>&lt;QUANTITY>104980&lt;/QUANTITY>&lt;VOLUME>173.46&lt;/VOLUME>&lt;EARNINGS>1889.64&lt;/EARNINGS>&lt;/PAYMENTDETAIL>&lt;PAYMENTDETAIL>&lt;PHASE_TYPE>Logging&lt;/PHASE_TYPE>&lt;CONTRACT_NUM>2731&lt;/CONTRACT_NUM>&lt;MARK_BLOCK>ES4334-0030&lt;/MARK_BLOCK>&lt;CUT_PERMIT>334&lt;/CUT_PERMIT>&lt;DESTINATION>LC&lt;/DESTINATION>&lt;STRATUM_CODE>06&lt;/STRATUM_CODE>&lt;SPECIES_CODE>FI&lt;/SPECIES_CODE>&lt;UOM_DESC>tonne&lt;/UOM_DESC>&lt;UOM_CODE>MT&lt;/UOM_CODE>&lt;GST_EXEMPT_FLAG>0&lt;/GST_EXEMPT_FLAG>&lt;ACTUAL_RATE>19.5&lt;/ACTUAL_RATE>&lt;GST_REGISTRANT_NUM>R104985114&lt;/GST_REGISTRANT_NUM>&lt;LOAD_COUNT>15&lt;/LOAD_COUNT>&lt;QUANTITY>514800&lt;/QUANTITY>&lt;VOLUME>610.27&lt;/VOLUME>&lt;EARNINGS>10038.64&lt;/EARNINGS>&lt;/PAYMENTDETAIL>&lt;PAYMENTDETAIL>&lt;PHASE_TYPE>Logging&lt;/PHASE_TYPE>&lt;CONTRACT_NUM>2731&lt;/CONTRACT_NUM>&lt;MARK_BLOCK>ES4334-0030&lt;/MARK_BLOCK>&lt;CUT_PERMIT>334&lt;/CUT_PERMIT>&lt;DESTINATION>LC&lt;/DESTINATION>&lt;STRATUM_CODE>18&lt;/STRATUM_CODE>&lt;SPECIES_CODE>SP&lt;/SPECIES_CODE>&lt;UOM_DESC>tonne&lt;/UOM_DESC>&lt;UOM_CODE>MT&lt;/UOM_CODE>&lt;GST_EXEMPT_FLAG>0&lt;/GST_EXEMPT_FLAG>&lt;ACTUAL_RATE>19.5&lt;/ACTUAL_RATE>&lt;GST_REGISTRANT_NUM>R104985114&lt;/GST_REGISTRANT_NUM>&lt;LOAD_COUNT>1&lt;/LOAD_COUNT>&lt;QUANTITY>35740&lt;/QUANTITY>&lt;VOLUME>46.43&lt;/VOLUME>&lt;EARNINGS>696.93&lt;/EARNINGS>&lt;/PAYMENTDETAIL>&lt;PAYMENTDETAIL>&lt;PHASE_TYPE>Logging&lt;/PHASE_TYPE>&lt;CONTRACT_NUM>2731&lt;/CONTRACT_NUM>&lt;MARK_BLOCK>ES4334-0030&lt;/MARK_BLOCK>&lt;CUT_PERMIT>334&lt;/CUT_PERMIT>&lt;DESTINATION>PUL&lt;/DESTINATION>&lt;STRATUM_CODE>16&lt;/STRATUM_CODE>&lt;SPECIES_CODE>LO&lt;/SPECIES_CODE>&lt;UOM_DESC>tonne&lt;/UOM_DESC>&lt;UOM_CODE>MT&lt;/UOM_CODE>&lt;GST_EXEMPT_FLAG>0&lt;/GST_EXEMPT_FLAG>&lt;ACTUAL_RATE>18&lt;/ACTUAL_RATE>&lt;GST_REGISTRANT_NUM>R104985114&lt;/GST_REGISTRANT_NUM>&lt;LOAD_COUNT>3&lt;/LOAD_COUNT>&lt;QUANTITY>100280&lt;/QUANTITY>&lt;VOLUME>165.68&lt;/VOLUME>&lt;EARNINGS>1805.04&lt;/EARNINGS>&lt;/PAYMENTDETAIL>&lt;PAYMENTDETAIL>&lt;PHASE_TYPE>Logging&lt;/PHASE_TYPE>&lt;CONTRACT_NUM>3350&lt;/CONTRACT_NUM>&lt;MARK_BLOCK>ES4922-0026&lt;/MARK_BLOCK>&lt;CUT_PERMIT>922&lt;/CUT_PERMIT>&lt;DESTINATION>LC&lt;/DESTINATION>&lt;STRATUM_CODE>06&lt;/STRATUM_CODE>&lt;SPECIES_CODE>FI&lt;/SPECIES_CODE>&lt;UOM_DESC>tonne&lt;/UOM_DESC>&lt;UOM_CODE>MT&lt;/UOM_CODE>&lt;GST_EXEMPT_FLAG>0&lt;/GST_EXEMPT_FLAG>&lt;ACTUAL_RATE>37&lt;/ACTUAL_RATE>&lt;GST_REGISTRANT_NUM>R123330532&lt;/GST_REGISTRANT_NUM>&lt;LOAD_COUNT>5&lt;/LOAD_COUNT>&lt;QUANTITY>197320&lt;/QUANTITY>&lt;VOLUME>233.92&lt;/VOLUME>&lt;EARNINGS>7300.84&lt;/EARNINGS>&lt;/PAYMENTDETAIL>&lt;PAYMENTDETAIL>&lt;PHASE_TYPE>Logging&lt;/PHASE_TYPE>&lt;CONTRACT_NUM>3350&lt;/CONTRACT_NUM>&lt;MARK_BLOCK>ES4922-0027&lt;/MARK_BLOCK>&lt;CUT_PERMIT>922&lt;/CUT_PERMIT>&lt;DESTINATION>LC&lt;/DESTINATION>&lt;STRATUM_CODE>21&lt;/STRATUM_CODE>&lt;SPECIES_CODE>MX&lt;/SPECIES_CODE>&lt;UOM_DESC>tonne&lt;/UOM_DESC>&lt;UOM_CODE>MT&lt;/UOM_CODE>&lt;GST_EXEMPT_FLAG>0&lt;/GST_EXEMPT_FLAG>&lt;ACTUAL_RATE>37&lt;/ACTUAL_RATE>&lt;GST_REGISTRANT_NUM>R123330532&lt;/GST_REGISTRANT_NUM>&lt;LOAD_COUNT>1&lt;/LOAD_COUNT>&lt;QUANTITY>38920&lt;/QUANTITY>&lt;VOLUME>50.08&lt;/VOLUME>&lt;EARNINGS>1440.04&lt;/EARNINGS>&lt;/PAYMENTDETAIL>&lt;

    Sorry I guess I haven't explained very well. When I am issuing the SELECT statement which uses XMLElement I have to convert output to string in order to have a column alais PAYMENTITEM. It is then not reconnized as XML in the
    xsql:query call
    If I do not assign a alias to query I get following error
    oracle.xml.sql.OracleXMLSQLException: Character ',' is not allowed in an XML tag
    If I assign without using getClobVal() I get this error
    oracle.xml.sql.OracleXMLSQLException: Conversion to String failed
    If I then use the getClobVal() to assign column alias it appears as if entire result set is now a string then <> tag delimiters are now show with "&lt" signs instead.

  • Table for 2way,3way matching .query to generate invoice with 2 ways matchin

    hi
    table for 2way,3way matching .query to generate invoice with 2 ways matching
    plz help me
    thanks

    Hello John, I put the (1,2,3) list in the query to show it works with multiple invoices.
    You should comment out the conditions:
    select a.invoice_no, b.child, sum(a.amount) from invoice_detail a,
    select
    child,
    decode (instr(scbp,'.'),0,scbp,
           substr(scbp, 1, instr(scbp,'.') -1)
           ) starting_child
    from (
    select ltrim(sys_connect_by_path(child,'.'),'.') scbp,
    child from
    element_relation
    start with child in (select element_id from invoice_detail /* where invoice_no in (1,2,3) */)
    connect by child = prior parent
    ) b
    where a.element_id = b.starting_child
    /* and a.invoice_no in (1,2,3) */
    group by a.invoice_no,b.child
    order by 1,2to show it works for all invoices
    regards, Tony

  • Querying, then generating ArrayLists with variable names

    Hi, all:
    I have two problems: first, I want to run through an array list called nodeList containing Nodes, each of which possesses a 5-digit value called culture. I want each Node to try to find out whether or not there are any other Nodes that have the same culture value that it does, i.e. if Node i has culture value 74936 and there are 4 other Nodes with the same culture value, I need to find 5 total Nodes with culture value 74936.
      public void statistics(){
           for (int i = 0; i < nodeList.size (); i++) {
                Node node = (Node) nodeList.get (i);
                int cultSame = node.getCulture();
                boolean same = cultSame == next.cultSame;
                if (same == true){
                     arrayListCreator();
                     //generated Arraylist add.node;
      }I'm going astray at next.cultSame. I'm not sure how to structure the query to the ArrayList nodeList to find all the other Nodes with the same culture value.
    Second: I want to create a little method to generate ArrayLists with names based on the integers that will be stored in them. Here's the method so far:
      public void arrayListCreator () {
           String name = String.valueOf(cultSame);
           name = new Arraylist();
      }cultSame is a 5-digit integer. The ArrayLists will be used to store all the nodes with the same cultSame value, like 74936, or whatever. If the ArrayList is storing nodes with the cultSame value of 74936, I want the name of the ArrayList to be the string 74936. I want to call on this method (like you can see in the first method) to generate the ArrayList with its given name and then use it to store the nodes in it. Once I've done that, I can figure out the statistics stuff on my own, I think. I'm just not sure how to create the ArrayLists with a name that's a variable, i.e. "name" should be the string variable containing a 5-digit number.

    Nquirer101 wrote:
    I probably should have separated this out into two threads. First, I'd like to know what I'm doing wrong when I'm building that boolean query to find out in the nodeList if any of the other nodes have the same culture value as the node doing the querying.Then by all means do so, from the looks of it, the scope of the thngs that need to be discussed/addressed is too broad for one thread. First there's the issue of your erroneous understanding of variable, then there's the concept of the Map data structure, then the implementation of it in Java, along with the idea of interface

  • Error in generating form with 6i

    I have installed designer 6i rel 2 with form developer 6i on NT
    4.0.
    When in design editor, I want to generate the form with generate
    module, the system generate "CDR-21600: A running Generator or
    Utility has failed."
    Also in action column writes: " It is possible that the internal
    cache is now in an inconsistent state. You are therefore
    recommended to close and restart the application."
    Could anyone tell me what is the problem and how to solve it.
    thanks

    Here is an document which describes some known causes of CDR-
    21600 errors. I hope it will help you.
    PURPOSE
    To describe some known causes of CDI-21600 errors and to
    suggest possible solutions and workarounds.
    SCOPE & APPLICATION
    This note was written for users of Oracle Designer releases 2.1.x
    and 6.0.
    CDI-21600 errors occur most frequently during Design Capture and
    when generating forms with the Forms and WebServer generators.
    Investigating CDI-21600 errors
    In Oracle Designer Release 2.1.2 and Release 6.0, this error has
    the form:
    CDI-21600 'A running generator or utility has failed'
    The Release 2.1.1 error message was: 'Generator or Utility throw
    an Exception'
    The CDI-21600 error message means that the generator is hitting
    an unhandled exception, also known as a GPF (general protection
    fault). The CDI-21600 error masks the underlying exception error.
    To see the real error do the following:
    1. Go into the Registry Editor (REGEDIT).
    2. Navigate to HKEY_LOCAL_MACHINE\software\oracle\des2_70
    3. Set EXCEPT_HANDLING to 0 (by default it is 1).
    Repeat the action that resulted in the error.
    Known Causes of CDI-21600 Errors and Possible Solutions
    Some of the reasons why CDI-21600 errors occur are listed below.
    1. A common cause of CDI-21600 errors is failure to install the
    necessary
    Developer patches.
    See [NOTE:64630.1] Developer Patches required to run
    Designer with Developer
    2. Check that Designer is running on a supported database. Also
    check that the
    TNS connection is correct.
    See [NOTE:60705.1] Designer Certification Matrix (HTML)
    3. Check for 'dangling' foreign keys, in other words FKs no longer
    owned by any
    table in the repository. Delete all invalid constraints.
    Invalid constraints may be created if you use the repository
    dump utility to
    dump and restore external foreign keys referencing tables
    shared into the
    application system, without dumping and restoring the tables
    that own them.
    If you restore a complete dump (rather than a 'skeleton' one),
    and then use
    the 'Reconnect Share Links' option when restoring, you may be
    able to
    resolve this problem.
    To get a complete list of 'dangling' constraints in your
    repository, connect
    using SQL*Plus and use the following query:
    SELECT app.name, key.name
    FROM ci_application_systems app, ci_constraints key
    WHERE key.table_reference IS NULL
    AND key.application_system_owned_by = app.id;
    You can also run CKAZANAL.ANAL_REFERENCES on your
    repository and delete all
    the invalid constraints that it finds. You can run the Repository
    Analyzer
    from: Front Panel -> Repository Administration Utility -> Utilities.
    NOTE: There may be inconsistencies in the repository that the
    Repository
    Analyzer cannot fix. You might solve such problems by
    dropping all the
    tables of your application, recreate them from the ERD,
    then use the
    DDT and recreate your modules.
    [BUG:847190] CDI-21600 during forms generation: 'dangling'
    foreign key
    "Since the generator is running on a repository that contains
    invalid
    constraints and the Repository Analyzer solves the problem,
    bug closed as
    unfeasible to fix."
    4. Check your modules for invalid or missing references such as
    missing window
    placements.
    5. Try generating your module against default templates and
    object libraries.
    6. When capturing forms or libraries, try capturing the form or
    library without
    application logic, then capture the application logic on its own.
    See [NOTE:1064690.6] CDI-21600 when capturing design of
    form with
    application logic
    [BUG:757541] DESCAP: CDI-21600 error reported when
    capturing with
    application logic
    Fixed In Ver: 6.0
    [BUG:926383] Duplicate of [BUG:757541] This has been fixed in
    2.1.2 patch
    779559. However you would be advised to apply a later patch
    such as 855635
    which fixes more bugs in this area.
    7. Make sure that all objects that are referenced by the form have
    been
    captured into the repository before capturing the form.
    8. A CDI-21600 will occur if a lookup usage displays only one
    column of
    datatype DATE or if the column of datatype DATE is displayed
    as the first
    item in the block.
    Workaround
    Add more column usages to the lookup block and do not
    display the DATE data
    type column usage as the first item in the block.
    9. [BUG:810472] CDI-21600 when 'Argument in Caller' is set
    Fixed In Ver: 6.5.3.0
    Workaround
    Make sure that you have an argument in the called module that
    is mapped to
    the "Argument Passed Value" in the calling module. The only
    way to get this
    mapping back once the APV has the <Module Argument> label
    is to delete it
    and recreate it.
    10. [BUG:801736] CDI-21600 on design capture of a form with
    subclassed object
    Fixed In Ver: 6.0.3.1.0 (backport)
    Fixed In Ver: 6.5
    You have an item that has been subclassed to an object.
    Checking the Design
    Capture option 'Capture Control Blocks' causes the CDI-21600
    error. Uncheck
    'Capture Control Blocks' and the problem does not occur. Open
    the FMB in
    Forms*Builder and look at Data Blocks -> Items. Break the link
    to the
    object, save the FMB, and the form will capture (similar to
    [BUG:794872]).
    Alternatively, ensure the link can be established.
    11. [BUG:850436] CDI-21600 on generation of a form with template
    having
    subclassed object group
    You try to generate a form out of Designer that uses a user-
    defined
    template. If a collection of objects in the template is grouped
    into an
    object group, dragged into the object library and then either
    copied or
    subclassed into a form, when the form is generated you get a
    CDI-21600
    error.
    12. [BUG:822659] Module generation fails (CDI-21600) with multi-
    column PK having
    long prompt text
    Fixed In Ver: 6.5.3.2
    Module generation with multi-column primary key having long
    prompt text
    causes CDI-21600 with preference MSGSFT set.
    Workaround
    Shorten the prompt text of PKs may not be not applicable. You
    may loose end
    user information.
    You may have the same problem with a mandatory compound
    FK. CASEOFG tries to
    generate a message '<P1> must be entered', where <P1>
    contains all the
    prompts of the bound items from the FK. If you reduce the
    length of the
    prompts, or set MSGSFT = NULL or WEDI = S or property
    Mandatory?=No, it
    works correctly.
    13. [BUG:792542] Capturing application logic causes CDI-21600
    (V2 style
    triggers)
    Fixed In Ver: 6.5.5
    After removal of the v2 triggers, the form captures/merges OK
    on 5.0.24.8,
    provided patch 875027 has not been applied.
    14. [BUG:790877] CDI-21600 if the primary/foreign keys have no
    key components
    Fixed In Ver: 6.5.11
    Generating a module with tables having a primary key not
    correctly defined
    (no PK component) will cause a CDI-21600 error. This can
    occur when
    unloading a module from the RON. If you pick up the module
    (and only the
    module) in the unload set, the table and its PK are unloaded as
    a skeleton.
    Loading the .DAT file into a new application will create a PK
    without a
    component.
    15. [BUG:771549] CDI-21600 if cannot connect to the DB with
    connect string in
    Options (Compile)
    Fixed In Ver: 6.5.13
    If you cannot connect to the DB with the connect string
    specified in options
    (Compile), the forms generator will fail with CDI-21600.
    This problem occurs when you cannot connect to the DB
    because:
    - the username or password is wrong;
    - or the SQL*Net alias is not defined in the TNSNAMES.ORA
    file;
    - or the SQL*Net listener is not started;
    - or the DB is down.
    16. [BUG:785106] CDI-21600 when generate master detail form
    with preserve layout
    [BUG:855812] is a duplicate of this bug.
    Fixed In Ver: 5.0.24.6.0 (Bug:860426 Backport request for 2.1.2)
    Fixed In Ver: 6.0
    Fixed In Ver: 6.5.3
    You have a master-detail Form with the Master having items
    partly on a TAB
    Canvas. Generate Module works OK. You enter Forms Builder
    and move some
    items on the tabs (just small changes, items are still on the
    same tabs).
    You change the look of the Detail and change Records
    Displayed. Now in
    Designer you generate the Module with Preserve Layout. You
    get a CDI-21600
    error. The problem might reproduce without doing any changes
    in Forms
    Builder, just by generating with Preserve Layout.
    17. [BUG:891306] If primary key column of lookup in check
    constraint comment of
    base table
    Fixed In Ver: 6.5.5
    Workaround
    Do not use the name of the bound item that is based on the
    primary key
    column of the lookup table in a check constraint comment of
    the base table.
    18. [BUG:896026] Forms gen throws assertion failure in
    CVINI/BUILDACTIONITEM@/CV/CVI/CVIBNI.CPP
    Fixed In Ver: 6.5.7
    A problem is caused by a PL/SQL definition (function, package,
    procedure)
    being defined as a called module for the module you are trying
    to generate.
    To resolve the problem and enable the module to be generated,
    remove all
    Called Modules that are PL/SQL definitions (functions,
    procedures or
    packages).
    See [NOTE:2107207.6] CDI-21600 during generation of module
    or Assertion
    Failure \cv\cvi\cvibni.cpp
    19. [BUG:812333] CDI-21600 generating a web module after
    adding an unbound item
    Fixed In Ver: 6.5.3.0
    Backport [BUG:1280667] raised to fix by 6.0.3.9
    You add an unbound item (SQL expression) to a Web module.
    When you try to
    generate the module you get a CDI-21600 error. If you delete the
    unbound
    item the Web module generates correctly.
    In a test case the problem occurred during validation of the
    derivation
    text, if the master module component was in a different module.
    A workaround
    was to rearrange module components so that this was not the
    case.
    20. [BUG:1627963] CCVDIAG::TRACEGENERATORMESSAGE
    WHEN GENERATING INCORRECT
    DERIVATION EXPRESSION
    Message
    CDR-21605: Failed while processing Module <mod> in function
    CCVDiag::TraceGeneratorMessage BOF
    Cause
    The generator failed due to an unexpected error - the
    error indicates the object the generator was processing
    when it failed.
    Helena

  • How to create a DB Adapter with select query having inner query

    Hi All,
    I am trying to create a DB Adapter with select query. The query has some inner queries in it. It is just like this select a, b, c, (select d from e) d, (select e from e) e from tablename.
    The problem here is with the xsd generated for this query. Xsd is not getting generated properly for all the fields it is just getting generated till c element and when it encounters
    the inner query it is stopping the generation of xsd. So for the above query the xsd is something similar to the below
    <xs:complexType name="rewOutput">
    <xs:sequence>
    <xs:element name="a" type="xs:string" nillable="true"/>
    <xs:element name="b" type="xs:string" nillable="true"/>
    <xs:element name="c" type="xs:string" nillable="true"/>
    <xs:element name="select_d" type="xs:string" nillable="true"/>
    </xs:sequence>
    </xs:complexType>
    as shown above the xsd is just getting generated till the first inner query. What should be done to get the full fledged xsd. Should it be manually built ?? Please help me on this.
    Thanks In Advance.
    Edited by: 959766 on Nov 30, 2012 1:20 AM

    Hi,
    I don't think the parser will be able to understand your query properly... I would try building the xsd manually...
    Cheers,
    Vlad

  • Fact tables are compatible with the query request

    Hi,
    i am using 11g.In 10g working fine without any error.After migrate 10g into 11g below error will returning. What is the problem and How we will fix.Could you pls let me know.Thanks
    Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 43113] Message returned from OBIS. [nQSError: 43119] Query Failed: [nQSError: 14020] None of the fact tables are compatible with the query request FACT_AGENT_TIME_STATISTICS.FKEY. (HY000)
    SQL Issued: SELECT s_0, s_1, s_2, s_3, s_4, s_5, s_6, s_7, s_8, s_9, s_10 FROM ( SELECT 0 s_0, "Team Performance"."DIMENSION - LOCATION"."COUNTRY CODE" s_1, "Team Performance"."DIMENSION - TIME"."BUSINESS DATE" s_2, CASE WHEN "Team Performance"."DIMENSION - TEAM"."ROLE" ='TEAM LEADER' THEN 'Team Leader' ELSE "Team Performance"."DIMENSION - TEAM"."TEAM" END s_3, CASE WHEN '30 Mins Interval' ='15 Mins Interval' THEN "Team Performance"."DIMENSION - TIME"."15 Mins Interval" ELSE "Team Performance"."DIMENSION - TIME"."30 Mins Interval" END s_4, ((SUM("Team Performance"."FACT - AGENT CALL STATISTICS"."TIME - ACD CALL HANDLING"+"Team Performance"."FACT - AGENT CALL STATISTICS"."TIME - AFTER CALL WORK (ACW)")+SUM("Team Performance"."FACT - AGENT TIME STATISTICS"."AVAILABLE TIME"))/60)/(COUNT(DISTINCT "Team Performance"."FACT - AGENT TIME STATISTICS"."DATE ID")*"Team Performance"."FACT - AGENT TIME STATISTICS"."INTERVAL TYPE") s_5, (SUM("Team Performance"."FACT - AGENT TIME STATISTICS"."AUX3 - TRAINING"+"Team Performance"."FACT - AGENT TIME STATISTICS"."AUX4 - MEETING"+"Team Performance"."FACT - AGENT TIME STATISTICS"."AUX5 - PROJECT"+"Team Performance"."FACT - AGENT TIME STATISTICS"."AUX6 - COACHING")/60)/(COUNT(DISTINCT "Team Performance"."FACT - AGENT TIME STATISTICS"."DATE ID")*"Team Performance"."FACT - AGENT TIME STATISTICS"."INTERVAL TYPE") s_6, (SUM("Team Performance"."FACT - AGENT TIME STATISTICS"."STAFFED TIME")/60)/(COUNT(DISTINCT "Team Performance"."FACT - AGENT TIME STATISTICS"."DATE ID")*"Team Performance"."FACT - AGENT TIME STATISTICS"."INTERVAL TYPE") s_7, COUNT(DISTINCT "Team Performance"."FACT - AGENT TIME STATISTICS"."DATE ID")*"Team Performance"."FACT - AGENT TIME STATISTICS"."INTERVAL TYPE" s_8, MIN("Team Performance"."DIMENSION - TIME"."FULL DATE TIME") s_9, REPORT_AGGREGATE(((SUM("Team Performance"."FACT - AGENT CALL STATISTICS"."TIME - ACD CALL HANDLING"+"Team Performance"."FACT - AGENT CALL STATISTICS"."TIME - AFTER CALL WORK (ACW)")+SUM("Team Performance"."FACT - AGENT TIME STATISTICS"."AVAILABLE TIME"))/60)/(COUNT(DISTINCT "Team Performance"."FACT - AGENT TIME STATISTICS"."DATE ID")*"Team Performance"."FACT - AGENT TIME STATISTICS"."INTERVAL TYPE") BY CASE WHEN '30 Mins Interval' ='15 Mins Interval' THEN "Team Performance"."DIMENSION - TIME"."15 Mins Interval" ELSE "Team Performance"."DIMENSION - TIME"."30 Mins Interval" END, CASE WHEN "Team Performance"."DIMENSION - TEAM"."ROLE" ='TEAM LEADER' THEN 'Team Leader' ELSE "Team Performance"."DIMENSION - TEAM"."TEAM" END) s_10 FROM "Team Performance" WHERE (("DIMENSION - TIME"."BUSINESS DATE" BETWEEN timestamp '2012-11-23 00:00:00' AND timestamp '2012-11-23 00:00:00') AND ("DIMENSION - LOCATION"."COUNTRY CODE" = 'US') AND ("DIMENSION - LOCATION".DEPARTMENT = 'CSG')) ) djm FETCH FIRST 65001 ROWS ONLY

    Back up your repository before following these steps:
    1 Reduce the problem report to minimum number of columns required to generate the error. This will usually identify which dimension and which fact are incompatible.
    2 Open the repository in the Administration tool and verify that the dimension and fact table join at the physical layer of the repository
    3 Verify that there is a complex join between the dimension and the fact in the business layer.
    4 Check the logical table sources for the fact table. At least one of them must have the Content tab set to a level in the hierarchy that represents the problem dimension. This is usually the detailed level.
    5 Check the logical table source Content tab for the dimension table. Unless there is a valid reason, this should be set to blank.
    6. Save any changes to the repository.

  • Character encoding with xsql

    I have a similar application running to the xsql document demo. However, when I am pulling the xml clob out of the database, the character set is incorrect and the xml is not parsed correctly.
    Instead of a "<" in the returned xml source, I get the following characters:
    & # 6 0 ;
    (No spaces in between them).
    I seem to have this problem regardless of what type of field I pull the data out of (varchar2, char).
    Whats going on here?
    null

    Thanks for all your help! I just have encountered one more problem blocking me from completing this.
    I use the following two xsql pages:
    <?xml version='1.0'?>
    <?xml:stylesheet type="text/xsl" href="doctorv3_IE5.xsl" ?>
    <xsql:include-xsql connection="demo" xmlns:xsql="urn:oracle-xsql"
    href="doc_detail.xsql?id={@id}"/>
    and
    <?xml version="1.0" encoding="Windows-1250" ?>
    <?xml-stylesheet type="text/xsl" href="clob.xsl" result-type="text/xml"?>
    <xsql:query connection="demo" rowset-element="" row-element="" max-rows="1"
    xmlns:xsql="urn:oracle-xsql">
    select /* x.xml_clob */ x.xml_clob DOC
    from user_xml x
    where x.ihc_user_id= {@id}
    </xsql:query>
    combined with the following two stylesheets
    doctorv3_ie5.xsl:
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:template match="*|/"><xsl:apply-templates/></xsl:template>
    <xsl:template match="text()|@*"><xsl:value-of select="."/></xsl:template>
    <xsl:template match="/">
    <head>
    <title>Sample XSL Stylesheet for Doctor Viewing Data</title>
    </head>
    <body>
    <center>
    <table width="100%" height="5%" border="5" cellspacing="0">
    <tr>
    <td bgcolor="#000077"><font size="+5" color="#FFFF00"><b><center>CLINICARE Patient Data</center></b></font></td>
    </tr>
    </table>
    </center>
    <p>
    <br></br>
    </p>
    <center>
    <table width="90%" height="5%" border="5" cellspacing="0">
    <tr>
    <td colspan="2" bgcolor="#000077"><font size="+3" color="#FFFF00"><b><center>Demographic Data</center></b></font></td>
    </tr>
    <tr>
    <td bgcolor="#000077" height="18" width="30%"><font size="+2" color="#FFFF00"><b>Surname</b></font></td>
    <td bgcolor="#FFFFFF" height="18"><font size="+2" color="#000077">
    <xsl:value-of select="/PatientSummary/ADMINISTRATIVE/PATIENT/PatName"/></font></td>
    </tr>
    <tr>
    <td bgcolor="#000077" height="18" width="30%"><font size="+2" color="#FFFF00"><b>First Name</b></font></td>
    <td bgcolor="#FFFFFF" height="18"><font size="+2" color="#000077">
    <xsl:value-of select="/PatientSummary/ADMINISTRATIVE/PATIENT/PatFirstName"/></font></td>
    </tr>
    <tr>
    <td bgcolor="#000077" heigh45t="18" width="30%"><font size="+2" color="#FFFF00"><b>Gender</b></font></td>
    <td bgcolor="#FFFFFF" height="18"><font size="+2" color="#000077">
    <xsl:value-of select="/PatientSummary/ADMINISTRATIVE/PATIENT/PatGenderCode"/></font></td>
    </tr>
    <tr>
    <td bgcolor="#000077" heigh45t="18" width="30%"><font size="+2" color="#FFFF00"><b>Date of Birth</b></font></td>
    <td bgcolor="#FFFFFF" height="18"><font size="+2" color="#000077">
    <xsl:value-of select="/PatientSummary/ADMINISTRATIVE/PATIENT/PatBirthDtm"/></font></td>
    </tr>
    <tr>
    <td bgcolor="#000077" heigh45t="18" width="30%"><font size="+2" color="#FFFF00"><b>Personal Health Number</b></font></td>
    <td bgcolor="#FFFFFF" height="18"><font size="+2" color="#000077">
    <xsl:value-of select="/PatientSummary/ADMINISTRATIVE/PATIENT/PatIDNum"/></font></td>
    </tr>
    <tr>
    <td bgcolor="#000077" height="18" width="30%"><font size="+2" color="#FFFF00"><b>Address</b></font></td>
    <td bgcolor="#FFFFFF" height="18"><font size="+2" color="#000077">
    <xsl:value-of select="/PatientSummary/ADMINISTRATIVE/PATIENT/PatPrimAddress/PatPrimAddressStreet"/></font></td>
    </tr>
    <tr>
    <td bgcolor="#000077" height="18" width="30%"><font size="+2" color="#FFFF 00"><b>Postal Code</b></font></td>
    <td bgcolor="#FFFFFF" height="18"><font size="+2" color="#000077">
    <xsl:apply-templates select="/PatientSummary/ADMINISTRATIVE/PATIENT/PatPrimAddress/PatPrimAddressPost"/></font></td>
    </tr>
    <tr>
    <td bgcolor="#000077" height="18" width="30%"><font size="+2" color="#FFFF00"><b>City</b></font></td>
    <td bgcolor="#FFFFFF" height="18"><font size="+2" color="#000077">
    <xsl:value-of select="/PatientSummary/ADMINISTRATIVE/PATIENT/PatPrimAddress/PatPrimAddressCity"/></font></td>
    </tr>
    <tr>
    <td bgcolor="#000077" height="18" width="30%"><font size="+2" color="#FFFF00"><b>Phone Number</b></font></td>
    <td bgcolor="#FFFFFF" height="18"><font size="+2" color="#000077">
    <xsl:value-of select="/PatientSummary/ADMINISTRATIVE/PATIENT/PatPrimAddress/PatPrimPhoneNum"/></font></td>
    </tr>
    </table>
    </center>
    <p>
    <br></br>
    </p>
    <center>
    <table width="90%" height="5%" border="5" cellspacing="0">
    <tr>
    <td colspan="2" bgcolor="#000077"><font size="+3" color="#FFFF00"><b><center>Primary Care Physician</center></b></font></td>
    </tr>
    <tr>
    <td bgcolor="#000077" height="18" width="30%"><font size="+2" color="#FFFF00"><b>Surname</b></font></td>
    <td bgcolor="#FFFFFF" height="18"><font size="+2" color="#000077">
    <xsl:apply-templates select="/PatientSummary/ADMINISTRATIVE/PRIMECAREPHYSICIAN/PatPrimCarePhysName"/></font></td>
    </tr>
    <tr>
    <td bgcolor="#000077" height="18" width="30%"><font size="+2" color="#FFFF00"><b>First Name</b></font></td>
    <td bgcolor="#FFFFFF" height="18"><font size="+2" color="#000077">
    <xsl:apply-templates select="/PatientSummary/ADMINISTRATIVE/PRIMECAREPHYSICIAN/PatPrimCarePhysFirstName"/></font></td>
    </tr>
    <tr>
    <td bgcolor="#000077" height="18" width="30%"><font size="+2" color="#FFFF00"><b>Specialty</b></font></td>
    <td bgcolor="#FFFFFF" height="18"><font size="+2" color="#000077">
    <xsl:apply-templates select="/PatientSummary/ADMINISTRATIVE/PRIMECAREPHYSICIAN/PatPrimCarePhys"/></font></td>
    </tr>
    </table>
    </center>
    <p>
    <br></br>
    </p>
    <center>
    <table width="90%" height="5%" border="5" cellspacing="0">
    <tr>
    <td bgcolor="#000077"><font size="+3" color="#FFFF00"><b><center>Patient History</center></b></font></td>
    </tr>
    </table>
    </center>
    <p>
    <br></br>
    </p>
    <xsl:for-each select="PatientSummary/HEALTHITEMS/PHYSICALEXAMS" order-by="HExamDate">
    <hr></hr>
    <p><font color="#000077" size="+1"><b>Notes Entry Date:</b><xsl:value-of select="HExamDate"/></font></p>
    <p><font color="#000077" size="+1"><b>Doctor's Name:</b><xsl:value-of select="HExamExaminerName"/></font></p>
    <p><font color="#000077" size="+1"><b>Doctor's Number:</b><xsl:value-of select="HExamExaminerNUM"/></font></p>
    <xsl:for-each select="HExamItem">
    <p><font color="#000077" size="+1"><b>Category Description:</b><xsl:value-of select="HExamItemIDName"/></font></p>
    <p><font color="#000077" size="+1"><b>Category Code:</b><xsl:value-of select="HExamItemIDCode"/></font></p>
    <p><font color="#000077" size="+1"><b>Notes Entry:</b></font></p>
    <xsl:for-each select="HExamText">
    <dd><font c olor="#000077" size="+1"><xsl:value-of/></font></dd>
    </xsl:for-each>
    </xsl:for-each>
    </xsl:for-each>
    <p>
    <br></br>
    </p>
    <center>
    <table width="90%" height="5%" border="5" cellspacing="0">
    <tr>
    <td bgcolor="#000077"><font size="+3" color="#FFFF00"><b><center>Lab Test History</center></b></font></td>
    </tr>
    </table>
    </center>
    <p>
    <br></br>
    </p>
    <xsl:for-each select="PatientSummary/HEALTHITEMS/TESTS/CLINICALTESTS" order-by="HExamDate">
    <hr></hr>
    <p><font color="#000077" size="+1"><b>Report Date:</b><xsl:value-of select="PHProbNum"/></font></p>
    <p><font color="#000077" size="+1"><b>Report Time:</b><xsl:value-of select="DXProcSpecTypeCode"/></font></p>
    <p><font color="#000077" size="+1"><b>Requisition #:</b><xsl:value-of select="DXOrdIDNum"/></font></p>
    <xsl:for-each select="DXClinLabTest">
    <p><font color="#000077" size="+1"><b>Test Name:</b><xsl:value-of select="DXClinLabTestName"/></font></p>
    <p><font color="#000077" size="+1"><b>Result Comments:</b></font></p>
    <xsl:for-each select="DXProcReportText">
    <dd><font color="#000077" size="+1"><xsl:value-of/></font></dd>
    </xsl:for-each>
    </xsl:for-each>
    <xsl:for-each select="DXProcNmeasAnalyte">
    <p><font color="#000077" size="+1"><b>Test Value:</b><xsl:value-of select="DXProcNmeasAnalValQty"/></font></p>
    <p><font color="#000077" size="+1"><b>Normality:</b><xsl:value-of select="DXProcNmeasAnalInterpCode"/></font></p>
    </xsl:for-each>
    </xsl:for-each>
    </body>
    </xsl:template>
    <xsl:template match="/PatientSummary/ADMINISTRATIVE/PRIMECAREPHYSICIAN/PatPrimCarePhysName">
    <xsl:value-of select="/PatientSummary/ADMINISTRATIVE/PRIMECAREPHYSICIAN/PatPrimCarePhysName"/>
    </xsl:template>
    <xsl:template match="/PatientSummary/ADMINISTRATIVE/PRIMECAREPHYSICIAN/PatPrimCarePhysFirstName">
    <xsl:value-of select="/PatientSummary/ADMINISTRATIVE/PRIMECAREPHYSICIAN/PatPrimCarePhysFirstName"/>
    </xsl:template>
    <xsl:template match="/PatientSummary/ADMINISTRATIVE/PRIMECAREPHYSICIAN/PatPrimCarePhys">
    <xsl:value-of select="/PatientSummary/ADMINISTRATIVE/PRIMECAREPHYSICIAN/PatPrimCarePhys"/>
    </xsl:template>
    <xsl:template match="/PatientSummary/ADMINISTRATIVE/PATIENT/PatPrimAddress/PatPrimAddressPost">
    <xsl:value-of select="/PatientSummary/ADMINISTRATIVE/PATIENT/PatPrimAddress/PatPrimAddressPost"/>
    </xsl:template>
    </xsl:stylesheet>
    and clob.xsl:
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
    <xsl:output method="xml" omit-xml-declaration="yes"/>
    <xsl:template match="@*|node()">
    <xsl:copy>
    <xsl:apply-templates select="@*|node()"/>
    </xsl:copy>
    </xsl:template>
    <xsl:template match="DOC">
    <xsl:value-of select="." disable-output-escaping="yes"/>
    </xsl:template>
    </xsl:stylesheet>
    If I remove the reference to the doctorv3_IE5 stylesheet, I recieve properly formatted xml code displayed in xml, thanks to the clob.xsl stylesheet. When I try to reference the stylesheet, however, the stylesheet doesn't format correctly - IE5 displays only the XSL stylesheet, not the XSL combined with the XML.
    Saving this xml code to a file and then combining it with the xsl works exactly like in should, but I cannot get the xsql page to combine the two properly.
    Any ideas on whats wrong?
    null

  • How to use "with clause query" in DBadapter

    Hi all,
    I need to implement a "with clause" query in oracle soa 11g bpel. When i put the query in db adapter in pure sql, the schema is not getting generated properly. Can any one suggest a solution to my problem.
    Regards,
    Kaushik

    Pure SQL won't work because it is expecting the first word in the SQL to be SELECT (or INSERT,UPDATE,DELETE).
    If your query is WITH ... SELECT ...
    try this:
    delete everything before SELECT. Copy and paste the generated XSD to another window. The SQL test may fail, but that will just mean that it couldn't fill in the types of the columns in the SELECT ... FROM list. You can always do that yourself by hand editing the XSD (including in the wizard before you hit next). Then put back the WITH ... clause before the remaining SELECT .... If the XSD gets overwritten, copy the version you saved in the other window and paste it over top. Then hit next and the runtime should still work.
    Keep in mind that SQL is very complex and hard to fully parse in the UI. However the minimum information the DbAdapter needs is quite limited; basically just the name and number of columns that are coming back. The XSD is meant to be editable in the wizard if the SQL is too complex.
    Thanks
    Steve

  • How to generate report with dynamic variable number of columns?

    How to generate report with dynamic variable number of columns?
    I need to generate a report with varying column names (state names) as follows:
    SELECT AK, AL, AR,... FROM States ;
    I get these column names from the result of another query.
    In order to clarify my question, Please consider following table:
    CREATE TABLE TIME_PERIODS (
    PERIOD     VARCHAR2 (50) PRIMARY KEY
    CREATE TABLE STATE_INCOME (
         NAME     VARCHAR2 (2),
         PERIOD     VARCHAR2 (50)     REFERENCES TIME_PERIODS (PERIOD) ,
         INCOME     NUMBER (12, 2)
    I like to generate a report as follows:
    AK CA DE FL ...
    PERIOD1 1222.23 2423.20 232.33 345.21
    PERIOD2
    PERIOD3
    Total 433242.23 56744.34 8872.21 2324.23 ...
    The TIME_PERIODS.Period and State.Name could change dynamically.
    So I can't specify the state name in Select query like
    SELECT AK, AL, AR,... FROM
    What is the best way to generate this report?

    SQL> -- test tables and test data:
    SQL> CREATE TABLE states
      2    (state VARCHAR2 (2))
      3  /
    Table created.
    SQL> INSERT INTO states
      2  VALUES ('AK')
      3  /
    1 row created.
    SQL> INSERT INTO states
      2  VALUES ('AL')
      3  /
    1 row created.
    SQL> INSERT INTO states
      2  VALUES ('AR')
      3  /
    1 row created.
    SQL> INSERT INTO states
      2  VALUES ('CA')
      3  /
    1 row created.
    SQL> INSERT INTO states
      2  VALUES ('DE')
      3  /
    1 row created.
    SQL> INSERT INTO states
      2  VALUES ('FL')
      3  /
    1 row created.
    SQL> CREATE TABLE TIME_PERIODS
      2    (PERIOD VARCHAR2 (50) PRIMARY KEY)
      3  /
    Table created.
    SQL> INSERT INTO time_periods
      2  VALUES ('PERIOD1')
      3  /
    1 row created.
    SQL> INSERT INTO time_periods
      2  VALUES ('PERIOD2')
      3  /
    1 row created.
    SQL> INSERT INTO time_periods
      2  VALUES ('PERIOD3')
      3  /
    1 row created.
    SQL> INSERT INTO time_periods
      2  VALUES ('PERIOD4')
      3  /
    1 row created.
    SQL> CREATE TABLE STATE_INCOME
      2    (NAME   VARCHAR2 (2),
      3       PERIOD VARCHAR2 (50) REFERENCES TIME_PERIODS (PERIOD),
      4       INCOME NUMBER (12, 2))
      5  /
    Table created.
    SQL> INSERT INTO state_income
      2  VALUES ('AK', 'PERIOD1', 1222.23)
      3  /
    1 row created.
    SQL> INSERT INTO state_income
      2  VALUES ('CA', 'PERIOD1', 2423.20)
      3  /
    1 row created.
    SQL> INSERT INTO state_income
      2  VALUES ('DE', 'PERIOD1', 232.33)
      3  /
    1 row created.
    SQL> INSERT INTO state_income
      2  VALUES ('FL', 'PERIOD1', 345.21)
      3  /
    1 row created.
    SQL> -- the basic query:
    SQL> SELECT   SUBSTR (time_periods.period, 1, 10) period,
      2             SUM (DECODE (name, 'AK', income)) "AK",
      3             SUM (DECODE (name, 'CA', income)) "CA",
      4             SUM (DECODE (name, 'DE', income)) "DE",
      5             SUM (DECODE (name, 'FL', income)) "FL"
      6  FROM     state_income, time_periods
      7  WHERE    time_periods.period = state_income.period (+)
      8  AND      time_periods.period IN ('PERIOD1','PERIOD2','PERIOD3')
      9  GROUP BY ROLLUP (time_periods.period)
    10  /
    PERIOD             AK         CA         DE         FL                                             
    PERIOD1       1222.23     2423.2     232.33     345.21                                             
    PERIOD2                                                                                            
    PERIOD3                                                                                            
                  1222.23     2423.2     232.33     345.21                                             
    SQL> -- package that dynamically executes the query
    SQL> -- given variable numbers and values
    SQL> -- of states and periods:
    SQL> CREATE OR REPLACE PACKAGE package_name
      2  AS
      3    TYPE cursor_type IS REF CURSOR;
      4    PROCEDURE procedure_name
      5        (p_periods   IN     VARCHAR2,
      6         p_states    IN     VARCHAR2,
      7         cursor_name IN OUT cursor_type);
      8  END package_name;
      9  /
    Package created.
    SQL> CREATE OR REPLACE PACKAGE BODY package_name
      2  AS
      3    PROCEDURE procedure_name
      4        (p_periods   IN     VARCHAR2,
      5         p_states    IN     VARCHAR2,
      6         cursor_name IN OUT cursor_type)
      7    IS
      8        v_periods          VARCHAR2 (1000);
      9        v_sql               VARCHAR2 (4000);
    10        v_states          VARCHAR2 (1000) := p_states;
    11    BEGIN
    12        v_periods := REPLACE (p_periods, ',', ''',''');
    13        v_sql := 'SELECT SUBSTR(time_periods.period,1,10) period';
    14        WHILE LENGTH (v_states) > 1
    15        LOOP
    16          v_sql := v_sql
    17          || ',SUM(DECODE(name,'''
    18          || SUBSTR (v_states,1,2) || ''',income)) "' || SUBSTR (v_states,1,2)
    19          || '"';
    20          v_states := LTRIM (SUBSTR (v_states, 3), ',');
    21        END LOOP;
    22        v_sql := v_sql
    23        || 'FROM     state_income, time_periods
    24            WHERE    time_periods.period = state_income.period (+)
    25            AND      time_periods.period IN (''' || v_periods || ''')
    26            GROUP BY ROLLUP (time_periods.period)';
    27        OPEN cursor_name FOR v_sql;
    28    END procedure_name;
    29  END package_name;
    30  /
    Package body created.
    SQL> -- sample executions from SQL:
    SQL> VARIABLE g_ref REFCURSOR
    SQL> EXEC package_name.procedure_name ('PERIOD1,PERIOD2,PERIOD3','AK,CA,DE,FL', :g_ref)
    PL/SQL procedure successfully completed.
    SQL> PRINT g_ref
    PERIOD             AK         CA         DE         FL                                             
    PERIOD1       1222.23     2423.2     232.33     345.21                                             
    PERIOD2                                                                                            
    PERIOD3                                                                                            
                  1222.23     2423.2     232.33     345.21                                             
    SQL> EXEC package_name.procedure_name ('PERIOD1,PERIOD2','AK,AL,AR', :g_ref)
    PL/SQL procedure successfully completed.
    SQL> PRINT g_ref
    PERIOD             AK         AL         AR                                                        
    PERIOD1       1222.23                                                                              
    PERIOD2                                                                                            
                  1222.23                                                                              
    SQL> -- sample execution from PL/SQL block
    SQL> -- using parameters derived from processing
    SQL> -- cursors containing results of other queries:
    SQL> DECLARE
      2    CURSOR c_period
      3    IS
      4    SELECT period
      5    FROM   time_periods;
      6    v_periods   VARCHAR2 (1000);
      7    v_delimiter VARCHAR2 (1) := NULL;
      8    CURSOR c_states
      9    IS
    10    SELECT state
    11    FROM   states;
    12    v_states    VARCHAR2 (1000);
    13  BEGIN
    14    FOR r_period IN c_period
    15    LOOP
    16        v_periods := v_periods || v_delimiter || r_period.period;
    17        v_delimiter := ',';
    18    END LOOP;
    19    v_delimiter := NULL;
    20    FOR r_states IN c_states
    21    LOOP
    22        v_states := v_states || v_delimiter || r_states.state;
    23        v_delimiter := ',';
    24    END LOOP;
    25    package_name.procedure_name (v_periods, v_states, :g_ref);
    26  END;
    27  /
    PL/SQL procedure successfully completed.
    SQL> PRINT g_ref
    PERIOD             AK         AL         AR         CA         DE         FL                       
    PERIOD1       1222.23                           2423.2     232.33     345.21                       
    PERIOD2                                                                                            
    PERIOD3                                                                                            
    PERIOD4                                                                                            
                  1222.23                           2423.2     232.33     345.21                       

  • XMLTABLE() with XSQL and XSL

    HI Gentlemen,
    I have an XMLTYPE table with data loaded in it, which I would like to query with JDeveloper, formatted. For normal relational tables it works fine. However, for an XMLTYPE table, where--in addition--XMLTABLE() must be involved, I only get the constant text portions, not the selected values. (Note that the same works with XML instances file and XSL stylesheet excellently, without JDeveloper.) My question is: How can I reference a coulumn in an XMLTABLE() table that is constructed during query?
    Included is the following:
    (1) XSQL file in JDeveloper
    (2) XSL stylesheet file in JDeveloper
    (3) Output of XSQL from JDeveloper when the <?xml-stylesheet...> is commented out
    Please help if you have an idea.
    (1) XSQL file under public-html
    <?xml version="1.0" encoding='windows-1252'?>
    <?xml-stylesheet type="text/xsl" href="untitled1.xsl" ?>
    <page xmlns:xsql="urn:oracle-xsql" connection="gksconnection">
    <xsql:query xmlns:xsql="urn:oracle-xsql" >
    SELECT
    des.ziffer,
    des.kap_bez,
    des.bereich,
    des.kapitel,
    des.abschnitt,
    des.kurztext,
    des.langtext,
    des.quittungstext
    FROM
    z p,
    XMLTable(XMLNAMESPACES('urn:ehd/001' as "n1", 'urn:ehd/go/001' as "n2"),
                        'for $i in /n1:ehd
    where $i/n1:header/n1:provider/n1:organization/n1:id/@EX eq "46" and
                        $i/n1:body/n2:gnr_liste/n2:gnr/@V eq "01700V"
                   return $i/n1:body/n2:gnr_liste/n2:gnr[@V="01700V"]'
    PASSING p.xml_document
    COLUMNS
    ziffer      VARCHAR2(12) PATH '@V',
    kap_bez VARCHAR2(255) PATH 'n2:allgemein/n2:legende/n2:kap_bez/@DN',
    bereich VARCHAR2(255) PATH 'n2:allgemein/n2:legende/n2:kap_bez/n2:bereich/@DN',
    kapitel VARCHAR2(255) PATH 'n2:allgemein/n2:legende/n2:kap_bez/n2:kapitel/@DN',
    abschnitt VARCHAR2(255) PATH 'n2:allgemein/n2:legende/n2:kap_bez/n2:abschnitt/@DN',
    kurztext      VARCHAR2(255) PATH 'n2:allgemein/n2:legende/n2:kurztext/@V',
    langtext      VARCHAR2(255) PATH 'n2:allgemein/n2:legende/n2:langtext/@V',
    quittungstext VARCHAR2(255) PATH 'n2:allgemein/n2:legende/n2:quittungstext/@V') des
    <!-- select * from z -->
    </xsql:query>
    </page>
    (2) XSL stylesheet under public-html
    <?xml version="1.0" encoding="windows-1252" ?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:ehd="urn:ehd/001" xmlns:pe="urn:ehd/go/001">
    <xsl:output encoding="ISO-8859-1" method="text/html" />
    <xsl:template match="/page">
    <html>
    <head>
    <title>EBM Ziffer</title>
    </head>
    <body style="font-family:verdana;color:black">
    <h2><xsl:text>Ziffer: </xsl:text>
    <xsl:value-of select="@V"/>
    </h2>
    <table border="1">
    <tr>
    <td><xsl:text>Gültigkeit</xsl:text></td>
    <td><xsl:value-of select="pe:allgemein/pe:gueltigkeit/pe:service_tmr/@V"/></td>
    </tr>
    <tr>
    <td><xsl:text>Bezeichnung Kapitel</xsl:text></td>
    <td><xsl:value-of select="pe:allgemein/pe:legende/pe:kap_bez/@V"/>
    <xsl:text> </xsl:text>
    <xsl:value-of select="pe:allgemein/pe:legende/pe:kap_bez/@DN"/></td>
    </tr>
    <tr>
    <td><xsl:text>Bereich</xsl:text></td>
    <td><xsl:value-of select="pe:allgemein/pe:legende/pe:kap_bez/pe:bereich/@V"/>
    <xsl:text> </xsl:text>
    <xsl:value-of select="pe:allgemein/pe:legende/pe:kap_bez/pe:bereich/@DN"/></td>
    </tr>
    <tr>
    <td><xsl:text>Kapitel</xsl:text></td>
    <td><xsl:value-of select="pe:allgemein/pe:legende/pe:kap_bez/pe:kapitel/@V"/>
    <xsl:text> </xsl:text>
    <xsl:value-of select="pe:allgemein/pe:legende/pe:kap_bez/pe:kapitel/@DN"/></td>
    </tr>
    <tr>
    <td><xsl:text>Abschnitt</xsl:text></td>
    <td><xsl:value-of select="pe:allgemein/pe:legende/pe:kap_bez/pe:abschnitt/@DN"/></td>
    </tr>
    <tr>
    <td><xsl:text>Unterabschnitt</xsl:text></td>
    <td><xsl:value-of select="pe:allgemein/pe:legende/pe:kap_bez/pe:uabschnitt/@DN"/></td>
    </tr>
    <tr>
    <td><xsl:text>Block</xsl:text></td>
    <td><xsl:value-of select="pe:allgemein/pe:legende/pe:kap_bez/pe:block/@DN"/></td>
    </tr>
    <tr>
    <td><xsl:text>Kurztext</xsl:text></td>
    <td><xsl:value-of select="pe:allgemein/pe:legende/pe:kurztext/@V"/></td>
    </tr>
    <tr>
    <td><xsl:text>Langtext</xsl:text></td>
    <td><xsl:value-of select="pe:allgemein/pe:legende/pe:langtext/@V"/></td>
    </tr>
    <tr>
    <td><xsl:text>Langtext (Fortsetzung)</xsl:text></td>
    <td><xsl:value-of select="pe:allgemein/pe:legende/pe:langtext_continued/@V"/></td>
    </tr>
    <tr>
    <td><xsl:text>Quittungstext</xsl:text></td>
    <td><xsl:value-of select="pe:allgemein/pe:legende/pe:quittungstext/@V"/></td>
    </tr>
    </table>
    <!-- Anmerkungen-Liste -->
    <h3><xsl:text>Anmerkungen</xsl:text></h3>
    <table border="1">
    <xsl:for-each select="pe:allgemein/pe:anmerkungen_liste/pe:anmerkung">
    <tr>
    <td><xsl:value-of select="@V"/></td>
    </tr>
    </xsl:for-each>
    </table>
    <!-- Leistungsinhalt-->
    <h3><xsl:text>Leistungsinhalt</xsl:text></h3>
    <table border="1" >
    <tr>
    <th><xsl:text>Komplex</xsl:text></th>
    <th><xsl:text>Leistung</xsl:text></th>
    </tr>
    <xsl:for-each select="pe:allgemein/pe:leistungsinhalt/pe:komplex">
    <tr>
    <td><xsl:value-of select="@V"/></td>
    <td>
    <xsl:for-each select="pe:leistung">
    <xsl:value-of select="@V"/>
    </xsl:for-each>
    </td>
    </tr>
    </xsl:for-each>
    </table>
    <!-- Bewertungsliste -->
    <h3><xsl:text>Bewertungen</xsl:text></h3>
    <table border="1">
    <tr>
    <th><xsl:text>Bewertung</xsl:text></th>
    <th><xsl:text>Einheit</xsl:text></th>
    <th><xsl:text>Gebührenordnung</xsl:text></th>
    <th><xsl:text>Leistungserbringerart</xsl:text></th>
    <th><xsl:text>Leistungstyp</xsl:text></th>
    <th><xsl:text>Versorgungsgebiet</xsl:text></th>
    </tr>
    <xsl:for-each select="pe:allgemein/pe:bewertung_liste/pe:bewertung">
    <tr>
    <td><xsl:value-of select="@V"/></td>
    <td><xsl:value-of select="@U"/></td>
    <td><xsl:value-of select="pe:gebuehrenordnung/@V"/></td>
    <td><xsl:value-of select="pe:leistungserbringerart/@V"/></td>
    <td><xsl:value-of select="pe:leistung_typ/@V"/></td>
    <td><xsl:value-of select="pe:versorgungsgebiet/@V"/></td>
    </tr>
    </xsl:for-each>
    </table>
    <!-- Zeitbedarfliste -->
    <h3><xsl:text>Zeitbedarfliste</xsl:text></h3>
    <table border="1">
    <tr>
    <th><xsl:text>Zeit</xsl:text></th>
    <th><xsl:text>Einheit</xsl:text></th>
    <th><xsl:text>Leistungstyp</xsl:text></th>
    </tr>
    <xsl:for-each select="pe:allgemein/pe:zeitbedarf_liste/pe:zeit">
    <tr>
    <td><xsl:value-of select="@V"/></td>
    <td><xsl:value-of select="@U"/></td>
    <td><xsl:value-of select="pe:leistung_typ/@V"/></td>
    </tr>
    </xsl:for-each>
    </table>
    <!-- Prüfzeit -->
    <h3><xsl:text>Prüfzeit</xsl:text></h3>
    <table border="1">
    <tr>
    <th><xsl:text>Zeitangabe</xsl:text></th>
    <th><xsl:text>Zeiteinheit</xsl:text></th>
    <th><xsl:text>Profiltyp</xsl:text></th>
    </tr>
    <tr>
    <td><xsl:value-of select="pe:allgemein/pe:pruefzeit/@V"/></td>
    <td><xsl:value-of select="pe:allgemein/pe:pruefzeit/@U"/></td>
    <td><xsl:value-of select="pe:allgemein/pe:pruefzeit/pe:zeitprofilart/@V"/></td>
    </tr>
    </table>
    <!-- RLV -->
    <h3><xsl:text>RLV</xsl:text></h3>
    <table border="1">
    <tr>
    <th><xsl:text>Kennzeichen</xsl:text></th>
    </tr>
    <tr>
    <td><xsl:value-of select="pe:allgemein/pe:rlv/@V"/></td>
    </tr>
    </table>
    <!-- Leistungsgruppe -->
    <h3><xsl:text>Leistungsgruppe</xsl:text></h3>
    <table border="1">
    <tr>
    <th><xsl:text>Code</xsl:text></th>
    </tr>
    <tr>
    <td><xsl:value-of select="pe:allgemein/pe:leistungsgruppe/@V"/></td>
    </tr>
    </table>
    <!-- Fachgruppen-Liste -->
    <h3><xsl:text>Fachgruppen</xsl:text></h3>
    <table border="1">
    <tr>
    <th><xsl:text>Versorgungsbereich</xsl:text></th>
    <th><xsl:text>Fachgruppe</xsl:text></th>
    </tr>
    <xsl:for-each select="pe:bedingung/pe:fachgruppe_liste/pe:versorgungsbereich">
    <tr>
    <td><xsl:value-of select="@V"/></td>
    <td>
    <xsl:for-each select="pe:fachgruppe">
    <xsl:value-of select="@V"/>
    </xsl:for-each>
    </td>
    </tr>
    </xsl:for-each>
    </table>
    <!-- Ausschlußiste -->
    <h3><xsl:text>Ausschlußliste</xsl:text></h3>
    <table border="1" >
    <tr>
    <th><xsl:text>Bezugsraum</xsl:text></th>
    <th><xsl:text>Ziffer</xsl:text></th>
    </tr>
    <xsl:for-each select="pe:regel/pe:ausschluss_liste/pe:bezugsraum">
    <tr>
    <td><xsl:value-of select="@U"/></td>
    <td>
    <xsl:for-each select="pe:gnr_liste/pe:gnr">
    <xsl:value-of select="@V"/>
    </xsl:for-each>
    </td>
    </tr>
    </xsl:for-each>
    </table>
    </body>
    </html>
    </xsl:template>
    </xsl:stylesheet>
    (3) XSQL output without stylesheet
    -<page>
    −<ROWSET>
    −<ROW num="1">
    <ZIFFER>01700V</ZIFFER>
    −<KAP_BEZ>
    Gesundheits- und Früherkennungsuntersuchungen, Mutterschaftsvorsorge, Empfängnisregelun g und Schwangerschaftsabbruch (vormals Sonstige Hilfen)
    </KAP_BEZ>
    <BEREICH>Arztgruppenübergreifende allgemeine Leistungen</BEREICH>
    <KAPITEL>Allgemeine Leistungen</KAPITEL>
    −<ABSCHNITT>
    Gesundheits- und Früherkennungsuntersuchungen, Mutterschaftsvorsorge, Empfängnisregel ung und Schwangerschaftsabbruch (vormals Sonstige Hilfen)
    </ABSCHNITT>
    −<KURZTEXT>
    Grundpauschale für Fachärzte für Laboratoriumsmedizin u.a.
    </KURZTEXT>
    −<LANGTEXT>
    Grundpauschale für Fachärzte für Laboratoriumsmedizin, Mikrobiologie und Infektionsepidemiologi e, Transfusionsmedizin und ermächtigte Fachwissenschaftler der Medizin für die Erbringung von Laborleistungen gemäß den Richtlinien des Gemeinsamen Bundesauss
    </LANGTEXT>
    −<QUITTUNGSTEXT>
    Grundpauschale für Fachärzte für Laboratoriumsmedizin u.a.
    </QUITTUNGSTEXT>
    </ROW>
    </ROWSET>
    </page>
    Please apologize that the stylesheet has considerably more than the XSQL query--this is going to be extended when the technique works.
    Thank you, kind regards
    Miklos HERBOLY

    Perhaps you could consider using the XMLType instead of varchar2 for the db columns, thus avoiding use of XMLTABLE() altogether.
    Consult for example the source code of :
    http://www.amazon.com/Oracle-XSQL-Combining-Publish-Dynamic/dp/0471271209
    You might also try posting to a more specialized forum such as:
    http://forums.oracle.com/forums/category.jspa?categoryID=51
    NA
    http://nickaiva.blogspot.com
    Edited by: Nick Aiva on Jan 21, 2011 9:17 PM

  • Problem with af:query

    Hi,
    I have a problem with af:query. Here's what I do:
    1. create a VO, define view criteria
    2. drag and drop view criteria from data controls to an empty form, choosing query and table
    3. When I run the page and click any of the buttons, I get: "Because of inactivity, your session has timed out and is no longer active...."
    I see no exceptions in output window. What am I doing wrong?
    Here is my view defenition:
    <?xml version="1.0" encoding="windows-1250" ?>
    <!DOCTYPE ViewObject SYSTEM "jbo_03_01.dtd">
    <!---->
    <ViewObject
    xmlns="http://xmlns.oracle.com/bc4j"
    Name="EmployeesView"
    Version="11.1.1.49.49"
    SelectList="Employees.EMPLOYEE_ID,
    Employees.FIRST_NAME,
    Employees.LAST_NAME,
    Employees.EMAIL,
    Employees.PHONE_NUMBER,
    Employees.HIRE_DATE,
    Employees.JOB_ID,
    Employees.SALARY,
    Employees.COMMISSION_PCT,
    Employees.MANAGER_ID,
    Employees.DEPARTMENT_ID"
    FromList="EMPLOYEES Employees"
    BindingStyle="OracleName"
    CustomQuery="false"
    PageIterMode="Full"
    UseGlueCode="false">
    <DesignTime>
    <Attr Name="_codeGenFlag2" Value="Access|VarAccess"/>
    </DesignTime>
    <Variable
    Name="firstName"
    Kind="viewcriteria"
    Type="java.lang.String"
    DefaultValue="0"/>
    <EntityUsage
    Name="Employees"
    Entity="project3.Employees"
    JoinType="INNER JOIN"/>
    <ViewAttribute
    Name="EmployeeId"
    IsNotNull="true"
    PrecisionRule="true"
    EntityAttrName="EmployeeId"
    EntityUsage="Employees"
    AliasName="EMPLOYEE_ID"/>
    <ViewAttribute
    Name="FirstName"
    PrecisionRule="true"
    EntityAttrName="FirstName"
    EntityUsage="Employees"
    AliasName="FIRST_NAME"/>
    <ViewAttribute
    Name="LastName"
    IsNotNull="true"
    PrecisionRule="true"
    EntityAttrName="LastName"
    EntityUsage="Employees"
    AliasName="LAST_NAME"/>
    <ViewAttribute
    Name="Email"
    IsUnique="true"
    IsNotNull="true"
    PrecisionRule="true"
    EntityAttrName="Email"
    EntityUsage="Employees"
    AliasName="EMAIL"/>
    <ViewAttribute
    Name="PhoneNumber"
    PrecisionRule="true"
    EntityAttrName="PhoneNumber"
    EntityUsage="Employees"
    AliasName="PHONE_NUMBER"/>
    <ViewAttribute
    Name="HireDate"
    IsNotNull="true"
    PrecisionRule="true"
    EntityAttrName="HireDate"
    EntityUsage="Employees"
    AliasName="HIRE_DATE"/>
    <ViewAttribute
    Name="JobId"
    IsNotNull="true"
    PrecisionRule="true"
    EntityAttrName="JobId"
    EntityUsage="Employees"
    AliasName="JOB_ID"/>
    <ViewAttribute
    Name="Salary"
    PrecisionRule="true"
    EntityAttrName="Salary"
    EntityUsage="Employees"
    AliasName="SALARY"/>
    <ViewAttribute
    Name="CommissionPct"
    PrecisionRule="true"
    EntityAttrName="CommissionPct"
    EntityUsage="Employees"
    AliasName="COMMISSION_PCT"/>
    <ViewAttribute
    Name="ManagerId"
    PrecisionRule="true"
    EntityAttrName="ManagerId"
    EntityUsage="Employees"
    AliasName="MANAGER_ID"/>
    <ViewAttribute
    Name="DepartmentId"
    PrecisionRule="true"
    EntityAttrName="DepartmentId"
    EntityUsage="Employees"
    AliasName="DEPARTMENT_ID"/>
    <ViewCriteria
    Name="EmployeesViewCriteria"
    ViewObjectName="project3.EmployeesView"
    Conjunction="AND">
    <Properties>
    <CustomProperties>
    <Property
    Name="mode"
    Value="Basic"/>
    <Property
    Name="allowConjunctionOverride"
    Value="true"/>
    <Property
    Name="autoExecute"
    Value="false"/>
    <Property
    Name="showInList"
    Value="true"/>
    <Property
    Name="displayOperators"
    Value="InAdvancedMode"/>
    </CustomProperties>
    </Properties>
    <ViewCriteriaRow
    Name="vcrow24"
    UpperColumns="1">
    <ViewCriteriaItem
    Name="FirstName"
    ViewAttribute="FirstName"
    Operator="STARTSWITH"
    Conjunction="AND"
    UpperColumns="0"
    Required="Optional">
    <ViewCriteriaItemValue
    Name="EmployeesViewCriteria_vcrow24_EmployeeId_vcval0"
    Value=":firstName"
    IsBindVarValue="true"/>
    </ViewCriteriaItem>
    </ViewCriteriaRow>
    </ViewCriteria>
    <ViewLinkAccessor
    Name="EmployeesView"
    ViewLink="project3.EmpManagerFkLink"
    Type="oracle.jbo.RowIterator"
    IsUpdateable="false"/>
    </ViewObject>
    And JSF page:
    <af:panelGroupLayout layout="vertical">
    <af:panelHeader text="Employees">
    <af:query id="employeesViewCriteriaQueryId" headerText="Search"
    disclosed="true"
    resultComponentId="employeesViewCriteriaQueryResultId"
    value="#{bindings.EmployeesViewCriteriaQuery.queryDescriptor}"
    model="#{bindings.EmployeesViewCriteriaQuery.queryModel}"
    queryListener="#{bindings.EmployeesViewCriteriaQuery.processQuery}"
    queryOperationListener="#{bindings.EmployeesViewCriteriaQuery.processQueryOperation}"/>
    </af:panelHeader>
    <af:table value="#{bindings.EmployeesView1.collectionModel}" var="row"
    rows="#{bindings.EmployeesView1.rangeSize}"
    emptyText="#{bindings.EmployeesView1.viewable ? 'No rows yet.' : 'Access Denied.'}"
    fetchSize="#{bindings.EmployeesView1.rangeSize}"
    id="employeesViewCriteriaQueryResultId">
    <af:column sortProperty="EmployeeId" sortable="false"
    headerText="#{bindings.EmployeesView1.hints.EmployeeId.label}">
    <af:outputText value="#{row.EmployeeId}">
    <af:convertNumber groupingUsed="false"
    pattern="#{bindings.EmployeesView1.hints.EmployeeId.format}"/>
    </af:outputText>
    </af:column>
    <af:column sortProperty="FirstName" sortable="false"
    headerText="#{bindings.EmployeesView1.hints.FirstName.label}">
    <af:outputText value="#{row.FirstName}"/>
    </af:column>
    <af:column sortProperty="LastName" sortable="false"
    headerText="#{bindings.EmployeesView1.hints.LastName.label}">
    <af:outputText value="#{row.LastName}"/>
    </af:column>
    </af:table>
    </af:panelGroupLayout>
    Regards
    Jernej
    Message was edited by:
    Jernej Kase

    It also seems that quick queries don't work with SQL92 sqlBuilder.
    I get the following error:
    Messages for this page are listed below.
    Error     
    SQL error during statement preparation. Statement: SELECT Employees.EMPLOYEE_ID, Employees.FIRST_NAME, Employees.LAST_NAME, Employees.EMAIL, Employees.PHONE_NUMBER, Employees.HIRE_DATE, Employees.JOB_ID, Employees.SALARY, Employees.COMMISSION_PCT, Employees.MANAGER_ID, Employees.DEPARTMENT_ID FROM EMPLOYEES Employees WHERE (( ( ( UPPER(Employees.FIRST_NAME) LIKE UPPER(:vc_temp_1) ) OR ( ? IS NULL ) ) ) )
    Error     
    Missing IN or OUT parameter at index:: 2
    Is this a bug or this doesn't work by design?
    Edit: and if I create named query I get the following error:
    Caused by: oracle.jbo.NoDefException: JBO-25058: Definition fn of type Attribute not found in EmployeesView1
         at oracle.jbo.server.ViewObjectImpl.findAttributeDef(ViewObjectImpl.java:5634)
         at oracle.jbo.uicli.binding.JUSearchBindingCustomizer.getQuickSearchVC(JUSearchBindingCustomizer.java:847)
         at oracle.adfinternal.view.faces.model.binding.FacesCtrlSearchBinding.processQuery(FacesCtrlSearchBinding.java:222)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at com.sun.el.parser.AstValue.invoke(AstValue.java:151)
         ... 47 more
    I think just ran out of options...
    Message was edited by:
    Jernej Kase

  • XSQL bug  when using CURSOR in xsql:query SELECT statement?

    Hi there,
    When I tested with different XSQL pages, I found out that if I
    did not involve any XSQL pages that contain "CURSOR", I received
    data correctly and when I shut down Tomcat, Oracle DB server did
    NOT create any dump file (???). However, as long as I involve a
    XSQL page which contains "CURSOR", even I received data
    correctly, but when I shut down my Tomcat, Oracle DB server
    created a dump file (???).
    for example, if I involve xsql:query like:
    <xsql:query>
    SELECT emp_name,
    emp_id
    CURSOR( SELECT emp_address
    from address a
    where a.emp_id = b.emp_id)
    FROM employee b
    </xsql:query>
    Once, I involve this xsql page, when I shut down Tomcat, Oracle
    dB will create a dump file on the server.
    Even when I run this xsql page from
    oracle.xml.xsqlXSQLCommandLine, Oracle dB server still create a
    dump file on the server.
    Any idea for help ?
    Thanks,

    Hi,
    Is this what you are trying:
        try {
        Statement *stmt = conn->createStatement("SELECT ename AS aaaaaaaaaaaaaaa  FROM emp");
          ResultSet *rs = stmt->executeQuery ();
          vector<MetaData> md = rs->getColumnListMetaData ();
          int numCols = md.size ();
          cout<< "Number of columns :" << numCols << endl;
          string *colName = new string [numCols];
          int type = (int ) malloc (numCols);
          for (int i = 0; i < numCols; i++ ) {
            int ptype = md [ i ].getInt (MetaData::ATTR_PTYPE);
            if ( ptype == MetaData::PTYPE_COL ) {
              colName[ i ] = md[ i ].getString (MetaData::ATTR_NAME);
              cout<<"Column Name :" << colName[ i ] << endl;
          delete[] colName;
          stmt->closeResultSet (rs);
          conn->terminateStatement (stmt);
        catch (SQLException &ex) {
                    cout<<ex.getMessage()<<endl;
        }The above snippet works correctly for me.
    Rgds.
    Amogh

Maybe you are looking for

  • Org.xml.sax.SAXParseException: Line 1, Column 1 : XML-0108: (Fatal Error)

    Hi , I am using SAX parser in a java code , which compiles and parses an xml correctly in the local JVM. But the same code in OC4J(10g) - version 9.0.4.2 throws the following exception when traced the error stack. 08/04/04 17:48:40 Loading file worki

  • HP LaserJet CP1215 HP Toolbox missing for Windows 8.1

    Hi, I would like to ask if I understand it right that there is no HP Toolbox for HP LaserJet CP1215 in Win 8.1. I am missing that very much as I quite often used quality of printing using calibration tool. And also it was quite nice to see how much o

  • How to get Formatted Mail Content through Java Application

    I am using a mail sending function in my applet code which is listed below: Main content is fetched from a format tool bar in JSP Page and it is passed as parameter to applet and it is used inside the mail content. Same content when passed and execut

  • Spatial Index problem with query

    I created a spatial index with user A. When i do a spatail query, i receive a good result. But, when i execute the same query with user B, i receive the following error : ERROR at line 1: ORA-13226: interface not supported without a spatial index ORA

  • Solution of "no ocijdbc8 in shared library path" Windows95 Jdeveloper 3.0

    I installed Jdeveloper 3.0 and got the message "no ocijdbc8 in shared library path". We are using Oracle 8.0.5 so I had Oracle 8.0.5 client in my PC. 1. I down loaded oci805jdbc.dll, oci805jdbc_g.dll and put my c:\orawin95\bin directory. The PATH con