XML sql query not displayed using SQLPLUS

Have a registered schema and 1 xml document successfully inserted using Oracle 10.2.0.3.0
I then run the following query:
select extract(object_value,'/warehouse/warehousename')from xwarehouses;
Expecting 1 record to be returned in SQLPLUS but get the following result:
EXTRACT(OBJECT_VALUE,'/WAREHOUSE/WAREHOUSENAME')
1 row selected.
Can anyone shed any light?

Thanks A-non.
I checked the long and longchunksize settings and they are the same as yours.
Your sample code runs perfectly but still my original problem remains.

Similar Messages

  • XML SQL query not displaying result in SQLPLUS

    Have a registered schema and 1 xml document successfully inserted using Oracle 10.2.0.3.0
    I then run the following query:
    select extract(object_value,'/warehouse/warehousename')from xwarehouses;
    Expecting 1 record to be returned in SQLPLUS but get the following result:
    EXTRACT(OBJECT_VALUE,'/WAREHOUSE/WAREHOUSENAME')
    1 row selected.
    Can anyone shed any light? Is it a setting in SQLPlus

    Thanks A Non
    I still cannot see where I am going wrong!
    The schema registers okay. My inserts work fine.
    --register the schema
    begin
    dbms_xmlschema.registerSchema(
    'http://www.oracle.com/xwarehouses.xsd',
    '<schema xmlns="http://www.w3.org/2001/XMLSchema"
    targetNamespace="http://www.oracle.com/xwarehouses.xsd"
    xmlns:who="http://www.oracle.com/xwarehouses.xsd"
    version="1.0"
    elementFormDefault="unqualified">
    <simpleType name="RentalType">
    <restriction base="string">
    <enumeration value="Rented"/>
    <enumeration value="Owned"/>
    </restriction>
    </simpleType>
    <simpleType name="ParkingType">
    <restriction base="string">
    <enumeration value="Street"/>
    <enumeration value="Lot"/>
    </restriction>
    </simpleType>
    <element name = "Warehouse">
    <complexType>
    <sequence>
    <element name = "WarehouseId" type = "positiveInteger"/>
    <element name = "WarehouseName" type = "string"/>
    <element name = "Building" type = "who:RentalType"/>
    <element name = "Area" type = "positiveInteger"/>
    <element name = "Docks" type = "positiveInteger"/>
    <element name = "DockType" type = "string"/>
    <element name = "WaterAccess" type = "boolean"/>
    <element name = "RailAccess" type = "boolean"/>
    <element name = "Parking" type = "who:ParkingType"/>
    <element name = "VClearance" type = "positiveInteger"/>
    </sequence>
    </complexType>
    </element>
    </schema>',
    TRUE, TRUE, FALSE, FALSE);
    end;
    --create the table
    CREATE TABLE xwarehouses OF XMLTYPE
    XMLSCHEMA "http://www.oracle.com/xwarehouses.xsd"
    ELEMENT "Warehouse";
    --Insert
    INSERT INTO xwarehouses VALUES(
    xmltype.createxml('<?xml version="1.0"?>
    <who:Warehouse xmlns:who="http://www.oracle.com/xwarehouses.xsd"
    xmlns:xs="http://www.w3.org/2001/XMLSchema-instance"
    xs:schemaLocation="http://www.oracle.com/xwarehouses.xsd
    http://www.oracle.com/xwarehouses.xsd">
    <WarehouseId>1</WarehouseId>
    <WarehouseName>Southlake, Texas</WarehouseName>
    <Building>Owned</Building>
    <Area>25000</Area>
    <Docks>2</Docks>
    <DockType>Rear load</DockType>
    <WaterAccess>true</WaterAccess>
    <RailAccess>false</RailAccess>
    <Parking>Street</Parking>
    <VClearance>10</VClearance>
    </who:Warehouse>'));
    I don't know if you see the error
    Thanks again.

  • Sql query not executed using recordset

    Hi All,
    I am trying to first format and then execute SQL query statement using recordset object with DI API. the issue is with vb.net's string formatting. I want to use 'USE [DB_Name]' statement in SQL and then 'Alter Procedure ..' statement. as this has to be the first statement in sql , I am using 'GO' in between and seperating each sentence with following syntax.
      Dim AltProc  as string
      AltProc = " USE [DB_name]" & Environment.NewLine
      AltProc = AltProc & " GO " &  Environment.NewLine
      AltProc = AltProc & " ALTER proc [proc_name] " &  Environment.NewLine
    '---------------------and so on
    Orec.DoQuery(AltProc)
    this formatting does not recognize new line and gives 'incorrect syntax near 'Go'' error.  strange thing is, if I take this query in SQL, it runs perfectly and I can see it getting formatted with each new line created. I tried even VbcrLf but it didnt work.
    any one has any idea?
    thanks in advance,
    Binita

    HI Binita
    The reason:
    GO is the "command" delimiter of MS Query Editor.
    It is not working with RecordSet Object.
    In MS SQL 2008 version you can define the schema before the procedure name but in SQL server 2000/2005 it is not possible.
    IN SQL 2008 use the Fully Qualified name instead of GO:
    Dim AltProc  as string
      AltProc = " ALTER proc [DB_name].[dbo].[proc_name] "  + vbcrlf
    '---------------------and so on
    Orec.DoQuery(AltProc)
    it is not working on MS SQL 2008 i have tried.
    'CREATE/ALTER PROCEDURE' does not allow specifying the database name as a prefix to the object name.'
    Regards,
    J.
    Edited by: Janos  Nagy on Jun 22, 2009 2:55 PM

  • Error in oracle.xml.sql.query

    I am trying to write small piece of code as
    follows
    import java.sql.*;
    import java.math.*;
    import oracle.xml.sql.query.*;
    import oracle.jdbc.*;
    import oracle.jdbc.driver.*;
    Actual Code
    When i try to compile
    the java file it errors out on Package Oracle.xml.sql.query not found in import
    Pacakage oracle.jdbc.* not found
    Package oracle.jdbc.driver not found
    Is there any files to be installed.
    I installed default Enterprise edition of Oracle 8.1.7 on NT
    Please advise
    Thanks,
    Vidhya
    null

    Have you include classes12.jar/zip, xsu12.jar in your classpath?(assume using JDK 1.2.x)

  • Class oracle.xml.sql.query.OracleXMLQuery not found in import

    I tried to perform load java using a non-sys user :
    loadjava -user user1/passwd -v -o -r Archive.java
    but encountered the following error:
    Errors in Archive:
    ORA-29535: source requires recompilation
    Archive:11: Class oracle.xml.sql.query.OracleXMLQuery not found in import.
    Info: 1 errors
    loadjava: 3 errors
    But if I use sys user I don't have any error:
    loadjava -user sys/manager -v -o -r Arachive.java
    initialization complete
    loading : Archive
    creating : Archive
    resolver :
    resolving: Archive
    Why is this so?
    ANy security setup that I missed?
    Thanks in advance.
    Note:
    my Archive.java file contains:
    // Core Java Classes
    import java.io.*;
    import java.sql.*;
    // Oracle Java classes
    import oracle.jdbc.*;
    import oracle.jdbc.driver.*;
    import oracle.xml.sql.query.OracleXMLQuery;
    null

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Azman Diron ([email protected]):
    I tried to perform load java using a non-sys user :
    loadjava -user user1/passwd -v -o -r Archive.java
    but encountered the following error:
    Errors in Archive:
    ORA-29535: source requires recompilation
    Archive:11: Class oracle.xml.sql.query.OracleXMLQuery not found in import.
    Info: 1 errors
    loadjava: 3 errors
    But if I use sys user I don't have any error:
    loadjava -user sys/manager -v -o -r Arachive.java
    initialization complete
    loading : Archive
    creating : Archive
    resolver :
    resolving: Archive
    Why is this so?
    ANy security setup that I missed?
    Thanks in advance.
    Note:
    my Archive.java file contains:
    // Core Java Classes
    import java.io.*;
    import java.sql.*;
    // Oracle Java classes
    import oracle.jdbc.*;
    import oracle.jdbc.driver.*;
    import oracle.xml.sql.query.OracleXMLQuery;
    <HR></BLOCKQUOTE>
    Managed to solve this problem.
    Drop all xml objects owned by sys and user1.
    Reload xml objcets for user1 with -force option.
    null

  • Oracle XSU: oracle.xml.sql.query.OracleXMLQuery is not recognized

    Hi, there!
    I've got a problem when tryed to use Oracle XSU (xml-sql utility to generate xml). My simple java application works fine using XSU. But when I created session stateless bean I've got an EJBException regarding this
    line:
    oracle.xml.sql.query.OracleXMLQuery qry = new oracle.xml.sql.query.OracleXMLQuery(conn, commandSQLStatement);
    It doesn't recognize OracleXMLQuery class as I've got in dump. So my classpath includes original location of that utility and Oracle parser.
    I really appreciate for any help.
    Thanks.
    strXML = qry.getXMLString();

    Patricia,
    Did you go through the link
    Re: XML SQL Utility
    You have to put xsu12.jar in the lib directory of the jdev.
    xsu12.jar is in the lib directory of the XDK installation.
    You can download XDK from
    http://www.oracle.com/technology/tech/xml/xdk/software/prod/xdk_java.html
    Just download the XDK kit, get the xsu12.jar from the lib directory and put in the lib directory of the jdev.
    -- Arvind

  • ORA-29540: class oracle/xml/sql/query/OracleXMLStaticQuery does not exist

    I am getting below error when trying to generate xml. Browsing on google did not help me. I would appreciate if someone can provide the solution.
    SQL> select dbms_xmlquery.getxml('select * from dual', 2) from dual;
    ERROR:
    ORA-29540: class oracle/xml/sql/query/OracleXMLStaticQuery does not exist
    ORA-06512: at "SYS.DBMS_XMLQUERY", line 19
    ORA-06512: at "SYS.DBMS_XMLQUERY", line 271
    ORA-06512: at line 1

    Then it is probably not the case that you are affected by the issue described in Metalink document 185857.1, but if I were you I would check it anyway, since it might be the problem.

  • Oracle.xml.sql.query.OracleXMLQuery not found

    Hi!
    Sorry, but I got a project to continue and there is an import statement "import oracle.xml.sql.query.OracleXMLQuery;" and this gives me a compilation error...
    What do I need to do, where do I find this class??? Any help?
    //Patricia

    Patricia,
    Did you go through the link
    Re: XML SQL Utility
    You have to put xsu12.jar in the lib directory of the jdev.
    xsu12.jar is in the lib directory of the XDK installation.
    You can download XDK from
    http://www.oracle.com/technology/tech/xml/xdk/software/prod/xdk_java.html
    Just download the XDK kit, get the xsu12.jar from the lib directory and put in the lib directory of the jdev.
    -- Arvind

  • Oracle.xml.sql.query.OracleXMLQuery   GetXML -withDTD

    I'm trying to create a dtd for each table in my schema. I've created a java program that loops through the user_tables and I am then trying to create the DTD with oracle.xml.sql.query.OracleXMLQuery -withDTD. I am able to make it work using the XSU Command Line Utility, but I'm having a hard time trying to find out where the -withDTD flag goes inside my java program. Anyone know how to use the -withDTD option inside of a java program?
    Thanks

    [from XmlRpc-Java]
    As a result, my XML
    is contained in a String instead of an InputStream.
    It is possible to convert a String to an InputStream using
    StringBufferInputStream, but this class is deprecated in favor of
    StringReader (as StringBufferInputStream does not properly convert
    characters into bytes).
    For the default HTTP transport, an InputStreamReader could be used to
    wrap the InputStream before calling parse().
    Ultimately, the InputStream is converted to an InputSource for use by
    the SAX parser. InputSource will accept a Reader as well.
    [from XmlRpc-Java]
    There should be a way to go from "getXMLString()" to "parse(Reader)" also. In the meantime I'm stuck.
    null

  • Oracle.xml.sql.query.OracleXMLQuery?

    Anyone know where I can find a java doc or any method infomation on:
    oracle.xml.sql.query.OracleXMLQuery
    thanks,
    chad.

    [from XmlRpc-Java]
    As a result, my XML
    is contained in a String instead of an InputStream.
    It is possible to convert a String to an InputStream using
    StringBufferInputStream, but this class is deprecated in favor of
    StringReader (as StringBufferInputStream does not properly convert
    characters into bytes).
    For the default HTTP transport, an InputStreamReader could be used to
    wrap the InputStream before calling parse().
    Ultimately, the InputStream is converted to an InputSource for use by
    the SAX parser. InputSource will accept a Reader as well.
    [from XmlRpc-Java]
    There should be a way to go from "getXMLString()" to "parse(Reader)" also. In the meantime I'm stuck.
    null

  • Java.lang.NoClassDefFoundError: oracle/xml/sql/query/OracleXMLQuery

    Hello, all.
    I get this error message:
    java.lang.NoClassDefFoundError: oracle/xml/sql/query/OracleXMLQuery
    at oracle.xml.xsql.actions.XSQLQueryHandler.handleAction(Compiled Code) ...
    when trying to view an xsql page with the jswdk 1.0.1 web server. (I have no problems when using Web-to-go)
    Classpath includes:
    C:\jdk1.1.8\lib\classes.zip;
    C:\xsql\lib\oraclexsql.jar;
    C:\xsql\lib\xmlparserv2.jar;
    C:\xsql\lib\xsu111.jar;
    C:\xsql\lib\classes111.zip;
    C:\xsql\lib;
    What could be the problem?
    Mateja
    null

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Steven Muench ([email protected]):
    Only thing I can think of is that maybe your server classpath is getting too long. I recall one of the Java Web Server releases having a classpath length limit that caused strange errors like this because that .jar files you thought were on your classpath were getting their path names truncated so the Java VM cannot find the JAR's.
    Try putting xsu111.jar earlier in the list of JAR's and/or try shortening the classpath (perhaps by using SUBST'd drive letters or softlinks on Unix to shorten the path names).<HR></BLOCKQUOTE>
    Putting the xsu11.jar file towards the start of the path did not help.
    I have rewriten the entire bat file that creates the CLASSPATH and starts the server and things now seem to work. There must have been some error in the original bat file, that I just couldn't see.
    Anyway - I thank you for your help.
    null

  • Problem in importing oracle.xml.sql.query.*

    When i am importing this
    import oracle.xml.sql.query.*;
    it is giving me error that
    "package oracle.xml.sql.query.* does not exist".
    What Should i install or set .

    [from XmlRpc-Java]
    As a result, my XML
    is contained in a String instead of an InputStream.
    It is possible to convert a String to an InputStream using
    StringBufferInputStream, but this class is deprecated in favor of
    StringReader (as StringBufferInputStream does not properly convert
    characters into bytes).
    For the default HTTP transport, an InputStreamReader could be used to
    wrap the InputStream before calling parse().
    Ultimately, the InputStream is converted to an InputSource for use by
    the SAX parser. InputSource will accept a Reader as well.
    [from XmlRpc-Java]
    There should be a way to go from "getXMLString()" to "parse(Reader)" also. In the meantime I'm stuck.
    null

  • Concatenate results SQL query and CASE use Report Builder Reporting Services

    I need to concatenate the results from a SQL query that is using CASE.  The query is listed below.  I do not need permitsubtype but I need to concatenate the results from the permittype. 
    I tried deleting the permitsubtype query and it would not run correctly.  Please see the query and diagram below.  Any help is appreciated.
    select  PERMIT_NO
    ,(case when
      ISNULL(PERMITTYPE,'') = ''
      then 'Unassigned'
      else (select LTRIM(RTRIM(PERMITTYPE)))
      END) AS PERMITTYPE
    ,(case when
      ISNULL(PERMITSUBTYPE,'') = ''
      then 'Unassigned'
      else (select LTRIM(RTRIM(PERMITSUBTYPE)))
      END) AS PERMITSUBTYPE
     ,ISSUED
     ,APPLIED
     ,STATUS 
     ,SITE_ADDR 
     ,SITE_APN
     ,SITE_SUBDIVISION
     ,OWNER_NAME
     ,CONTRACTOR_NAME
     ,ISNULL(JOBVALUE,0) AS JOBVALUE
     ,FEES_CHARGED
     ,FEES_PAID
    ,BLDG_SF
    from Permit_Main
    where ISSUED between @FromDate and @ToDate

    Hi KittyCat101,
    As per my understanding, you used case when statement in the query, you do not need to display permitsubtype in the report, but when you tried to delete permitsubtype from the query, it could not run correctly. In order to improve the efficiency of troubleshooting,
    I need to ask several questions:
    “I tried deleting the permitsubtype query and it would not run correctly.” As we can see, it has no effect to delete permitsubtype from the query you provided, could you please provide complete sql query for the report?
    Could you please provide detailed information about the report? I would be appreciated it if you could provide sample data and screenshot of the report.
    Please provide some more detailed information of your requirements.
    This may be a lot of information to ask for at one time. However, by collecting this information now, it will help us move more quickly toward a solution.
    Thanks,
    Wendy Fu

  • Import oracle.xml.sql.query

    what file do I need to use this class?
    Thanks.

    oracle.xml.sql.query is a package.
    Please refer
    http://www.devx.com/xml/Article/32046

  • XML SQL - query the table with XML in column [urgent]

    I have table which have to be query-ied with
    oracle.xml.sql.query.OracleXMLQuery class to produce XML
    document for web.
    Problem is that in one column is already XML data (well formed
    HTML) like this:
    <font face="Arial">click</font>
    and when I call OracleXMLQuery.getXMLString() it encode all's '<'
    as ';lt' and so on.
    Can I turn off that kind of encoding some way or is it better
    sollution for this?
    thanks in advance
    Bojan
    null

    You can use an XSLT Stylesheet to achieve what you are wanting to do.
    Say the name of the column containing
    the markup is named "DOC", then
    transforming the output of OracleXMLQuery
    by the following stylesheet using
    the oracle.xml.parser.v2.XSLProcessor...
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
    <xsl utput 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>
    Will give the results you are looking for.
    You can use the XSQL Servlet to make this combination even easier if that is applicable to your situation.

Maybe you are looking for

  • Report using reuse_alv_hiersql_list FM and reuse_alv_block_list FM

    Dear all, I have a report were in i need to display two reports for branch wise report and for sales employee wise report.The report is accepted for branchwise were i'm using reuse_alv_hiersal_list_display FM.And as per the business scenario i was fo

  • Controlling Leopard user permissions with launchd-user.conf

    INTRODUCTION: For the uninitiated OS X file permissions are still being developed and documented. In the meantime some default permissions are not prudently set, eg new items created by users grant read access to 'everyone'. There is growing interest

  • Itunes is messed up need help.

    Itunes will not let me buy a song on my intunes girft card when i have $1.31 left on it. It says "Insufficien Ramaning Store Credit" But the song is $1.29. What do i do?

  • Adobe flash issues with both IE6 and Firefox

    I just installed adobe flash 9 on my win2k computer. When I try to go to www.yourminis.com I get two different results, in IE6 I start to get a web page, but then IE freezes. In Firefox, I get a big blue quicktime Q the blinks a bit, then a question

  • Trusted ca keystore

    Using WebLogic Portal 7.0 on Solaris 8. I have installed the Portal Login Framework per the instructions for mutual authentication. One of the steps says that if using Portal 7.0 to add the trusted ca root certificates to the keystore as described in