SQL query validation with XML?

Hi
Is there anything out there that will validate an SQL statement (validate meaning the SQL statement 'will run') using XML?
I want to make a servlet that takes SQL and adds it to a java class that will in turn do a bunch of magical things. However
I need the SQL to be validated before it gets written to the class.
XML seems like it would be a useful tool to accomplish this but I fear the
document would be friggen huge and run slow as hell.
I guess in essence it would be like creating an SQL compiler completely
out of XML.
Does something like this exist or is this solution just to broad to realistically consider?

There is no kind of relashionship between SQL and XML. Moreover, with RDBMs having different flavors of SQL, how can you expect an XML parser to be able to tell you that your query will run on Oracle but non on SQL Server?

Similar Messages

  • How to send SQL query results to XML ?

    Hey Guys, I am querying a DB with huge amount of traffic. A user select a particular lot and then details of the lot will be displayed in the following page. My concern here is that it takes really LONG to retrieve back the results coz it has to requiry in the following JSP page.
    I was told to use XML to retrieve the dataset and store it. Hence, in the following query it will re-query only from the recordsets in the XML file (...Logically, should be faster rite ? ). Hence, how do parse my recordsets retrieved from the SQL query to an XML file ?
    Any sort of suggestion , help, reference would be deeply appreciated ..Thanks !

    <HTML>
    <BODY>
    <H1>Manufacturing Summary beta </H1><BR>
    <%@ page import="java.sql.*" %>
    <%@ page import="java.lang.*" %>
    <%@ page import="java.text.*" %>
    <jsp:include page="/index.html" flush="true"/>
    <P><B>Returned result<B><BR>
    <B>Query String :</B><%=request.getParameter("date") %>
    <TABLE BORDER=1 cellpadding=0 cellspacing=0>
    <%!
    static double roundDouble(double toBeRounded, int fractionDigits)
    NumberFormat format = NumberFormat.getInstance();
    format.setMaximumFractionDigits(fractionDigits);
    String tempDouble = format.format(toBeRounded);
    return Double.parseDouble(tempDouble);
    %>
    <%
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@klmomnidb:1521:
    OMNIDB","omni","omni");
    Statement stmt = null;
    ResultSet rset = null;
    String S_date = new String();
    String temp = new String();
    String lot_id = new String();
    String result = new String();
    String SQL_String = new String();
    double yield;
    int bad_cnt;
    S_date = request.getParameter("date");
    lot_id = request.getParameter("lot_id");
    temp = request.getParameter("TST_TEMP");
    SQL_String = "SELECT LOT_ID, FLOW_ID, TST_TEMP, MODE_COD, RTST_COD, PART_CNT, GO
    OD_CNT, OPER_NAM, JOB_REV, PROC_ID, START_T, FACIL_ID, TSTR_TYP, NODE_NAM FROM L
    OT where START_T > TO_DATE('"+ S_date + "','MM/DD/YYYY') AND TST_TEMP <='" + tem
    p+"' order by START_T";
    out.println(SQL_String);
    stmt = conn.createStatement();
    rset = stmt.executeQuery (SQL_String);
    out.println("<TR>");
    out.println("<TD> Select Lot(s)</TD>");
    out.println("<TD>Flow </TD>");
    out.println("<TD>Temp </TD>");
    out.println("<TD>Test Mode </TD>");
    out.println("<TD>Retest</TD>");
    out.println("<TD>Total </TD>");
    out.println("<TD>Good</TD>");
    out.println("<TD>Bad</TD>");
    out.println("<TD>Yield </TD>");
    out.println("<TD>UserID</TD>");
    out.println("<TD>Program</TD>");
    out.println("<TD>Mask</TD>");
    out.println("<TD>Start Time </TD>");
    out.println("<TD>Loc </TD>");
    out.println("<TD>Tester</TD>");
    out.println("<TD>System </TD>");
    out.println("</TR>");
    if (! rset.next()) {
    result ="No records found matching seach criteria.";
    while (rset.next()) {
    bad_cnt = Integer.parseInt(rset.getString(6)) - Integer.parseInt(rset.getString(
    7));
    yield = (Double.parseDouble(rset.getString(7)) / Double.parseDouble(rset.getStri
    ng(6))) * 100;
    result= "<TR>";
    result = result + "<TD><a href=coolpage.jsp?LOT_ID=" + rset.getString(1)+ ">" +
    rset.getString(1) + "</A></TD>";
    result = result + "<TD>" + rset.getString(2) + "</TD>";
    result = result + "<TD>" + rset.getString(3) + "</TD>";
    result = result + "<TD>" + rset.getString(4) + "</TD>";
    result = result + "<TD>" + rset.getString(5) + "</TD>";
    result = result + "<TD>" + rset.getString(6) + "</TD>";
    result = result + "<TD>" + rset.getString(7) + "</TD>";
    result = result + "<TD>" + bad_cnt + "</TD>";
    result = result + "<TD>" + roundDouble(yield,2) + "% </TD>";
    result = result + "<TD>" + rset.getString(8) + "</TD>";
    result = result + "<TD>" + rset.getString(9) + "</TD>";
    result = result + "<TD>" + rset.getString(10) + "</TD>";
    result = result + "<TD>" + rset.getString(11) + "</TD>";
    result = result + "<TD>" + rset.getString(12) + "</TD>";
    result = result + "<TD>" + rset.getString(13) + "</TD>";
    result = result + "<TD>" + rset.getString(14) + "</TD>";
    result = result + "</TR>"; %>
    <%=result%>
    <% }
    rset.close();
    stmt.close();
    conn.close();
    %>
    <%=result%>
    </TABLE>
    </BODY>
    </HTML>

  • How to numberformat when using sql:query alogn with c:forEach JSTL tags

    Is there anyway to format the numeric values returned from the database when using <sql:query> alogn with <c:forEach> tags
    Here is my jsp code
    <sql:query..../>
    <c:forEach var="row" items="${queryResults.rows}">
    <tr>
    <td><c:out value="${row.COL1}" /></td>
    <td><c:out value="${row.COL2}" /></td>
    </tr>
    </c:forEach>
    Col1 values are numeric without any formats Eg: 1000, 10000, 1000000 etc.
    how can i format them to 1,000 , 10,1000 , 100,000 etc

    It is polite to mention what your answer was. These posts are not just here for you to ask questions, but to be used as a resource for other people to find answers. Saying "I solved it" with no details helps noone.
    I presume you discovered the JSTL <fmt:formatNumber> tag?

  • Flash Chart Series : SQL Query Validation

    Hello,
    I probably found a bug on the SQL Query Validation for Flash Charts, if I have two subqueries, the validation fails:
    SQL Query example:
    SELECT NULL, a, b
    FROM (SELECT c a, d b FROM
    ( SELECT 'first' c, 2 d FROM DUAL))
    Error returned:
    "Failed to parse SQL query:
    ORA-06550: line 1, column 45: PLS-00428: an INTO clause is expected in this SELECT statement"
    Is this problem known or is there just something that I do wrong ?
    Christophe

    Yes it was that problem, but I still have an issue:
    How do I set the Flash Chart to use a PL/SQL function in the first place ?
    When I try to enter:
    "return package.function;" in the Create Region Wizard, I get the following error:
    Failed to parse SQL query:
    return EXPERT.getFullListSQLByNC
    ORA-00900: invalid SQL statement
    Certain queries can only be executed when running your application, if your query appears syntactically correct, you can save your query without validation (see options below query source).

  • Are XML Tags starting with '_' underscore valid with XML DB?

    Dear Experts,
    I am importing an XML data file into an XMLType field in a table, then extracting data within a tag. I am using Oracle Database version 10.2.0.2.0
    The data file I am using looks like:
    <?xml version="1.0" ?>
    <_PARENT>
    <_EXAMPLES>
    <_ITEM_NO>1</_ITEM_NO>
    <_PAX_NO>1</_PAX_NO>
    ....etc.
    If I then extract it using the command:
    SELECT extractValue(e.XML_INVOICE_DATA, '/_PARENT/_EXAMPLES/_ITEM_NO')      
    FROM XXIBO_XML_STAGE_TABLE      e
    I get the error:
    SQL Error: ORA-31011: XML parsing failed
    ORA-19202: Error occurred in XML processing
    LPX-00601: Invalid token in: '/_PARENT/_EXAMPLES/_ITEM_NO'
    31011. 00000 - "XML parsing failed"
    *Cause:    XML parser returned an error while trying to parse the document.
    *Action:   Check if the document to be parsed is valid.
    If I take out the '_' underscores prefixing the XML tab names e.g:
    <?xml version="1.0" ?>
    <PARENT>
    <EXAMPLES>
    <ITEM_NO>1</ITEM_NO>
    <PAX_NO>1</PAX_NO>
    ....etc.
    and run:
    SELECT extractValue(e.XML_INVOICE_DATA, '/PARENT/EXAMPLES/ITEM_NO')
    FROM XXIBO_XML_STAGE_TABLE      e
    This query works, which leads me to my origional question - is it invalid to have XML tags that are named starting with an underscore, when manipulating it in an XMLType object?
    Many thanks for your time,
    Mark

    Ants - thanks very much for that, has been useful.
    Mark

  • Sql query generator from xml data

    Hi,
    I am looking for an open source tool in java which would generate the sql query with an xml configuration file as input. The xml configuration file schema would be defined by the tool and and would provide placeholders for giving the various information required to build the sql query.
    Are there any available?
    Please let me know.
    Anshuk

    hi All,
    I tried below . but still no luck .
    CREATE OR REPLACE FUNCTION get_audit_trail_log(cikey IN INTEGER) RETURN blob IS
    CURSOR c_log(l_cikey INTEGER) IS
    SELECT *
    FROM PROD_SOAINFRA.audit_details atr
    WHERE cikey = l_cikey
    ORDER BY count_id;
    bl BLOB;
    BEGIN
    dbms_lob.createtemporary (bl, TRUE);
    FOR r_log IN c_log(cikey)
    LOOP
    dbms_lob.append (bl,r_log.log);
    END LOOP;
    RETURN(bl);
    END;
    =======================================
    SELECT UTL_RAW.CAST_TO_VARCHAR2(UTL_COMPRESS.LZ_UNCOMPRESS(get_audit_trail_log(ci.cikey)))
    FROM PROD_SOAINFRA.audit_details ci
    WHERE cikey = 848063749
    =======================================
    Error:
    =====================
    ORA-22835: Buffer too small for CLOB to CHAR or BLOB to RAW conversion (actual: 20958, maximum: 2000)
    22835. 00000 - "Buffer too small for CLOB to CHAR or BLOB to RAW conversion (actual: %s, maximum: %s)"
    *Cause:    An attempt was made to convert CLOB to CHAR or BLOB to RAW, where
    the LOB size was bigger than the buffer limit for CHAR and RAW
    types.
    Note that widths are reported in characters if character length
    semantics are in effect for the column, otherwise widths are
    reported in bytes.
    *Action:   Do one of the following
    1. Make the LOB smaller before performing the conversion,
    for example, by using SUBSTR on CLOB
    2. Use DBMS_LOB.SUBSTR to convert CLOB to CHAR or BLOB to RAW.

  • SQL query slow with call to function

    I have a SQL query that will return in less than a second or two with a function in-line selected in the "from" clause of the statement. As soon as I select that returned value in the SQL statement, the statement takes from anywhere from 2 to 5 minutes to return. Here is a simplified sample from the statement:
    This statement returns in a second or 2.
    select A.pk_id
    from stu_schedule A, stu_school B, stu_year C, school_year D,
    (select calc_ytd_class_abs2(Z.PK_ID,'U') ytd_unx
    from stu_schedule Z) II
    where B.pk_id = A.fk_stu_school
    and C.pk_id = B.fk_stu_year
    and D.pk_id = C.year
    and D.school_year = '2011';
    if I add this function call in, the statement runs extremely poor.
    select A.pk_id,
    II.ytd_unx
    from stu_schedule A, stu_school B, stu_year C, school_year D,
    (select calc_ytd_class_abs2(Z.PK_ID,'U') ytd_unx
    from stu_schedule Z) II
    where B.pk_id = A.fk_stu_school
    and C.pk_id = B.fk_stu_year
    and D.pk_id = C.year
    and D.school_year = '2011';
    Here is the function that is called:
    create or replace FUNCTION calc_ytd_class_abs2 (p_fk_stu_schedule in varchar2,
    p_legality in varchar2) return number IS
    l_days_absent number := 0;
    CURSOR get_class_abs IS
    select (select nvl(max(D.days_absent),'0')
    from cut_code D
    where D.pk_id = C.fk_cut_code
    and (D.legality = p_legality
    or p_legality = '%')) days_absent
    from stu_schedule_detail B, stu_class_attendance C
    where B.fk_stu_schedule = p_fk_stu_schedule
    and C.fk_stu_schedule_detail = B.pk_id;
    BEGIN
    FOR x in get_class_abs LOOP
    l_days_absent := l_days_absent + x.days_absent;
    END LOOP;
    return (l_days_absent);
    END calc_ytd_class_abs2;

    Query returns anywhere from 6000 to 32000 rows. For each of those rows a parameter is passed in to 4 different functions to get ytd totals. When I call the functions in the in-line view but do not select from them in the main SQL, the report (oh, this is Application Express 4.0 interactive reports, just an FYI) runs fast. The report comes back in a few seconds. But when I select from the in-line view to display those ytd totals, the report runs extremely slow. I know there are the articles about context switching and how mixing SQL with PL/SQL performs poorly. So I tried a pipeline table function where the function for the ytd totals populate the columns of the pipeline table and I select from the pipeline table in the SQL query in the interactive report. That seemed to perform a little worse from what I can tell.
    Thanks for any help you can offer.

  • Can we run SQL query on a XML file?

    Hi All
    I have an XML document which stores data of a table.
    My requirement is to retreive data from this XML document by firing SQL
    query.
    i.e "SELECT * FROM EMP" should give me the data from the EMP.XML file
    whose name is the table name.
    Does Oracle provide this feature to retreive data from an XML document
    by issuing the same SQL statement that is used in Database?
    Any pointer for this requirement is highly appreciated.
    Thanks in advance..
    Ashish

    select '<EMPLOYEE><EPNUM>' || EPNUM || '</EPNUM><EMPNAME>' || EMPNAME || '</EMPNAME></EMPLOYEE>' from EMPLOYEE;

  • Problem in executeQuery(SQL query sentence with a ' );

    for example:
    String strName="";
    //here strName is searching key value.
    String strQueryString="SELECT * FROM Authors WHERE name='" strName "'";
    ResultSet rs=st.executeQuery(strQueryString);
    if strName value is "yijun_lee",that will return all information which the name columns value is "yijun_lee" with SQL Query sentence SELECT * FROM Authors WHERE name='yijun_lee'
    but if strName value is "yijun ' lee",that value contains a '.that will error!
    how to do?
    thanks very much!

    You could parse <strName > and insert another ' for each '
    A concrete example would be SELECT * FROM Authors WHERE name='yijun '' lee'HTH

  • SQL Query Result with Random Sorting

    Hi Experts,
    My Oracle Version : Oracle9i
    I have three tables which are given below,
    Table Name:     check_team
    team_id      team_code
    100          A
    101          B
    102          C
    103          D
    Table Name:     check_product
    product_id     product_code
    1          XXX
    2          XYZ
    Table Name:     check_team_products
    tprod_id     tprod_team_id     tprod_product_id
    1          100          1
    2          100          2
    3          101          1
    4          101          2
    5          102          1
    6          102          2
    7          103          1
    8          103          2
    Required Output First Time:
    team_id   team_code   product_id   product_code
    100       A           1             XXX
    101       B           2             XYZ
    102       A           1             XXX
    103       B           2             XYZ
    Required Output Second Time:
    team_id   team_code   product_id   product_code
    100       B           2             XYZ
    101       A           1             XXX
    102       B           2             XYZ
    103       A           1             XXXI need the result as Required Output specified above and also the result has to be random too.. Can someone help me in writing a SQL Query to get results as that?
    Added Oracle Version

    So, is it something like this you want?
    SQL> ed
    Wrote file afiedt.buf
      1  with check_team as (select 100 as team_id, 'A' as team_code from dual union all
      2                      select 101, 'B' from dual union all
      3                      select 102, 'C' from dual union all
      4                      select 103, 'D' from dual)
      5      ,check_product as (select 1 as product_id, 'XXX' as product_code from dual union all
      6                         select 2, 'XYZ' from dual)
      7      ,check_team_products as (select 1 as tprod_id, 100 as tprod_team_id, 1 as tprod_product_id from dual union all
      8                               select 2, 100, 2 from dual union all
      9                               select 3, 101, 1 from dual union all
    10                               select 4, 101, 2 from dual union all
    11                               select 5, 102, 1 from dual union all
    12                               select 6, 102, 2 from dual union all
    13                               select 7, 103, 1 from dual union all
    14                               select 8, 103, 2 from dual)
    15  --
    16  -- end of test data
    17  --
    18  select team_id, team_code, product_id, product_code
    19  from (
    20        select t.team_id, t.team_code, p.product_id, p.product_code
    21              ,row_number() over (partition by team_id order by dbms_random.random()) as rn
    22        from check_team t join check_team_products tp on (tp.tprod_team_id = t.team_id)
    23                          join check_product p on (p.product_id = tp.tprod_product_id)
    24       )
    25* where rn = 1
    SQL> /
       TEAM_ID T PRODUCT_ID PRO
           100 A          2 XYZ
           101 B          1 XXX
           102 C          2 XYZ
           103 D          1 XXX
    SQL> /
       TEAM_ID T PRODUCT_ID PRO
           100 A          2 XYZ
           101 B          1 XXX
           102 C          2 XYZ
           103 D          1 XXX
    SQL> /
       TEAM_ID T PRODUCT_ID PRO
           100 A          1 XXX
           101 B          2 XYZ
           102 C          1 XXX
           103 D          1 XXX

  • SQL query result with HTML Data in output

    Hello,
    I have a SQL table , in one column I store HTML data. I need to query the table and get the HTML data in the columns that have 'HREF'. The output shows as grid on the sql management studio, however when I export it to excel, the HTML data does not get copied
    correctly, since there are HTML tags etc.
    How can I export the report correctly from SQL ?

    Hello,
    The HTML data is stored in a column with datatype as nvarchar(max). Sample data in the column is shown below. It is with formatting etc and is rendered as is on the web page. the business wants to generate a quick report so that they can see the pages that
    have links displayed. I can do that by querying the columns that have a 'HREF' in the text.
    Can I get the exact HREF values using just sql query? There can be more than one links on a page.
    Also, If I just want to copy the whole column and paste it on excel, how can I do that? If I copy the data below and paste, it does not get copied in one cell.. it spreads across multiple cells, so the report does not make any sense.
    <br />
    <table border="0" cellpadding="0" cellspacing="0" style="width: 431pt; border-collapse: collapse;" width="574">
    <tbody>
    <tr height="19" style="height: 14.25pt; ">
    <td height="19" style="border: 0px blue; width: 431pt; height: 14.25pt; background-color: transparent;" width="574"><a href="https:"><u><font color="#0066cc" face="Calibri">ax </font></u></a></td>
    </tr>
    </tbody>
    <colgroup>
    <col style="width: 431pt; " width="574" />
    </colgroup>
    </table>

  • SQL Query execution with LISTAGG

    Hello,
    I am trying to get some data using LISTAGG functionality.
    I have below query with works fine with the table, but not with the rowsource which is based on same table.
    SELECT COL1,LISTAGG(COL3, ',') WITHIN GROUP (ORDER BY COL2) AS fieldName FROM IOP_Sample_RS GROUP BY COL1it gives parsing error
    line 1:22: expecting "FROM", found '('col 22 is '(' of LISTAGG function.
    One more Question
    Does UNION, MINUS works with RSQL in IOP?
    Thanks,
    Sumant Chhunchha.
    Edited by: Sumant on Jun 15, 2011 5:04 AM

    LISTAGG, UNION, MINUS is not supported with RSQL, instead you can massage your SQL query to load data into IOP and then use a simple RSQL query.

  • How to write sql query to parse xml?

    Hi, I am new to this parsing xml. I need to extract value from xml using sql query. Please find the sample xml file. Kindly help me.
    <?xml version="1.0" encoding="UTF-8"?>
    <MaterialUpdates>
      <Materials>
         <SalesOrg>
           <ID>KAR12</ID>
         </SalesOrg>
    </Materials>
    </MaterialUpdates>
    I need to extratct ID value : /MaterialUpdates/Materials/SalesOrg/ID

    Thanks once again, it is working as per your suggestion. One last question .. how about in case of there is multiple nodes.
    Please find sample xml below:
    <?xml version="1.0" encoding="UTF-8"?>
    <MaterialUpdates>
      <Materials>
         <SalesOrg>
           <ID>KAR12</ID>
         </SalesOrg>
         <SalesOrg>
           <ID>KAR13</ID>
         </SalesOrg>
         <SalesOrg>
           <ID>KAR14</ID>
         </SalesOrg>
    </Materials>
    </MaterialUpdates>
    The above mentioned sql query works fine when there is one occurance of SalesOrg - ID, but fails when there is multiple occurance.

  • Storing the SQL Query results as XML

    Hi All,
    I have a proc to select all the data from emp table and insert into another table. For some reason it inserts only one column and one record.
    I don't have any row limit or skip ...
    CREATE OR REPLACE procedure Convert_Data_Into_XML1
    as
    -- Var Declartion
    qryCtx DBMS_XMLGEN.ctxHandle;
    result CLOB;
    BEGIN
    qryCtx := dbms_xmlgen.newContext('SELECT * from emp');
    -- set the row header to be EMPLOYEE
    DBMS_XMLGEN.setRowTag(qryCtx, 'Employee-ROW');
    DBMS_XMLGEN.setRowsetTag(qryCtx, 'Employee-rowset');
    LOOP
    -- now get the result
    result := DBMS_XMLGEN.getXML(qryCtx);
    DBMS_OUTPUT.PUT_LINE ('In the Loop');
    EXIT WHEN DBMS_XMLGEN.getNumRowsProcessed(qryCtx) = 0;
    INSERT INTO temp_clob_tab VALUES (result);
    END LOOP;
    COMMIT;
    --close context
    DBMS_XMLGEN.closeContext(qryCtx);
    exception
    when others then
    dbms_output.put_line(TO_CHAR(sqlerrm));
    END;
    Basically I got this sample proc from Oracle website. As per the website I should be able to store all the records from emp table.
    How can I debug this.
    Here is the output from SQLPLUS&gt;
    SQL&gt; select result from temp_clob_tab;
    RESULT
    &lt;?xml version="1.0"?&gt;
    &lt;Employee-rowset&gt;
    &lt;Employee-ROW&gt;
    &lt;EMPNO&gt;7369&lt;/EMPNO&gt;
    &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;
    Thanks in advance
    Siva

    I am able to convert the SQL query output and I am able to store it in a XMLTYPE column.
    But the code doesn't work when I took the same code and try to Implement inside a Trigger. The reason I am doing this is, when there is an update or delete, I want to store the whole record as a XMLTYPE doc (before and After). But the code compiles fine, but when I tried to update a record it gives error.
    CREATE OR REPLACE TRIGGER INS_UPDDEV_EMP3_F
    BEFORE UPDATE OR DELETE ON EMP
    FOR EACH ROW
    DECLARE
    V_DBUSER VARCHAR2(50);
    V_CHANGETYPE VARCHAR2(20) := 'INSERT' ;
    QRYCTX DBMS_XMLGEN.CTXHANDLE ;
    OLDVALUE XMLTYPE;
    NEWVALUE XMLTYPE;
    BEGIN
    IF :OLD.EMPNO &lt;&gt; :NEW.EMPNO or DELETING then
    ---------- old Value
    QRYCTX := DBMS_XMLGEN.NEWCONTEXT ('SELECT :OLD.EMPNO, :OLD.ENAME, :OLD.JOB, :OLD.MGR, :OLD.HIREDATE, :OLD.SAL, :OLD.COMM, :OLD.DEPTNO FROM EMP WHERE EMPNO=:OLD.EMPNO ');
    DBMS_XMLGEN.SETROWTAG (QRYCTX, 'DEPTROW');
    DBMS_XMLGEN.SETROWSETTAG(QRYCTX, 'DEPTSET');
    OLDVALUE := XMLTYPE(DBMS_XMLGEN.GETXML(QRYCTX));
    ------------------------- new Value
    QRYCTX := DBMS_XMLGEN.NEWCONTEXT ('Select * WHERE EMPNO=:NEW.EMPNO '); -- WHERE :OLD.EMPNO
         DBMS_XMLGEN.SETROWTAG (QRYCTX, 'DEPTROW');
    DBMS_XMLGEN.SETROWSETTAG(QRYCTX, 'DEPTSET');
    NEWVALUE := XMLTYPE(DBMS_XMLGEN.GETXML(QRYCTX));
    V_CHANGETYPE := 'UPDATE' ;
    INSERT INTO ADM_RECAUDITHISTORY VALUES ('table emp', 'fIELD all', OLDVALUE, OLDVALUE,
    V_CHANGETYPE , SYSDATE, 'TIGER TRIG');
    commit;
    END IF;
    END;
    I am getting the following error while updating the record.
    &gt;&gt;&gt;&gt;
    ERROR at line 1:
    ORA-19206: Invalid value for query or REF CURSOR parameter
    ORA-06512: at "SYS.DBMS_XMLGEN", line 83
    ORA-06512: at "SCOTT.INS_UPDDEV_EMP3_F", line 13
    ORA-04088: error during execution of trigger 'SCOTT.INS_UPDDEV_EMP3_F'
    &gt;&gt;&gt;&gt;&gt;
    Is anyone knows why I am getting this error.
    Thanks
    Siva

  • Validating with XML Schemas

    Has anyone been successful at validating xml with a Schema running weblogic 6.1
    sp2?
    Here is a snippet of code...
    SAXParserFactory objFactory = SAXParserFactory.newInstance();
    objFactory.setValidating("true");
    objFactory.setNamespaceAware("true");
    objFactory.setFeature("http://apache.org/xml/features/validation/schema", "true");
    objXMLInputParser.parse(new InputSource(new StringReader(XMLDocument)), A_HANDLER);
    When my xml code runs through the parser I get an error for each element saying
    the element type is not declared in the dtd or schema.
    Since weblogic 6.1 runs with 1.3.1 Xerces parser. Does it support xml validation
    with a Schema. From what I've read it seems that it does.
    Any help or insight would be appreciated.
    Thanks
    Karen

    I figured out my problem in case anyone else is having trouble..
    In the xml document that you need to refer to:
    xmlns:xsd="http://www.w3.org/2000/10/XMLSchema-instance that is the namespace
    supported by xerces 1.3.1.
    Whew!
    "Karen Schaper" <[email protected]> wrote:
    >
    Has anyone been successful at validating xml with a Schema running weblogic
    6.1
    sp2?
    Here is a snippet of code...
    SAXParserFactory objFactory = SAXParserFactory.newInstance();
    objFactory.setValidating("true");
    objFactory.setNamespaceAware("true");
    objFactory.setFeature("http://apache.org/xml/features/validation/schema",
    "true");
    objXMLInputParser.parse(new InputSource(new StringReader(XMLDocument)),
    A_HANDLER);
    When my xml code runs through the parser I get an error for each element
    saying
    the element type is not declared in the dtd or schema.
    Since weblogic 6.1 runs with 1.3.1 Xerces parser. Does it support xml
    validation
    with a Schema. From what I've read it seems that it does.
    Any help or insight would be appreciated.
    Thanks
    Karen

Maybe you are looking for

  • Read-only/hidden fields in self request form

    I have a prepop plugin for one of the field which generates a number from an oracle sequence, i don't want requesters to modify it, so I would like to either hide it or make it read only. Also, can i put some label/help text to put in some instructio

  • Required Start date in Notification

    Hi All, Maint order is assigned as a call object for a maint plan. After scheduling the maint order is generated with the basic date as per the planned date in maint plan. But the notification generated along with the order has the required start dat

  • How t o do customer / vendor Down payment Mass entries

    Hi gurus, Can any body tell me How can i do the customer & vendor mass Advances down payment entries? when i tried to use the T.code: F-29 (customer down payment) i fill the first line item &when i go through the following path: Select GOTO Tab >>> G

  • How can I do a Save As with Adobe Reader Touch?

    Is there a way to do a File Save As with Touch?

  • Mouse-Over Labels sometimes truncated (bug fix requested)

    Hello, In both Xcelsius 2008 and all subsequent fixes, the Mouse-Over labels are sometimes truncated.  It happens when I have a text category that could be translated as a number.  For example, if I name a category "1E" ("1E" is a type of problem tha