Dbms_xmlgen.getxml not returning entire data set

hi, i'm trying to return xml from oracle using the following: select dbms_xmlgen.getxml('select * from person') from dual, but it's not returning everything. it's returning data only up to a certain point. I've condensed it alot just so you'd get the gist, but in reality, there are about 50 columns in this table.
set pages 0
set linesize 150
set long 9999999
set head off
"(CLOB) <?xml version="1.0"?>
<ROWSET>
<ROW>
<name>joe smith</name>
<bday>1/1/2011</bday>
<citizen>yes</citizen>
</ROW>
<ROW>
<name>joe smith</name>
<bday>1/1/2011</bday>
<citizen>..."
i've even "set long 2000000000" as some people have recommended, but that didn't work either. what gives?
thanks!

Yes, it's a display issue.
In SQL*Plus, also set LONGCHUNKSIZE option :
SET LONG 10000
SET LONGCHUNKSIZE 10000Note : those are not "magic" values, you'll have to experiment a little to find what works best for your expected output.
What do you actually want to do with the XML data?
If it's really that big, why not write it to a file?
DECLARE
res CLOB;
BEGIN
select dbms_xmlgen.getxml('select * from person')
into res
from dual;
dbms_xslprocessor.clob2file(res, 'TEST_DIR', 'result.xml');
END;
/

Similar Messages

  • Avoid JDBC sender error: Execute statement did not return a result set

    Hi!
    My JDBC sender adapter towards MS SQL server works fine, with an Execute statement calling a stored procedure that returns the source data needed. The stored procedure itself updates the status of database table records, so that only the unread records are returned each time the stored procedure is called.
    However, the communication channel monitoring sets a red flag for the JDBC sender adapter, when there are no values to fetch from the database table (using the stored procedure). Message says: "Database-level error reported by JDBC driver while executing statement 'EXECUTE FetchMessage 1, 9000'. The JDBC driver returned the following error message: 'com.microsoft.sqlserver.jdbc.SQLServerException: The statement did not return a result set.'. For details, contact your database server vendor."
    This is not an error situation, as I do not expect there to be any values to fetch from the database at all times.
    I do not see how to change the stored procedure to avoid this error.
    Is there a parameter to be set on the JDBC adapter that I can use, so the red flag is avoided?
    Thanks for any input!
    Regards,
    Oeystein Emhjellen

    Hi Oeystein Emhjellen.
    The problem is Store Procedure that has to generate always a ResultSet (or cursor). If it doesn't have a output, you have to generate an Empty ResultSet.
    Like a SELECT Statement:
    If there are data, SELECT get an output result but if it get nothing the SELECT Statement get a empty ResultSet.
    Ask to your database team.
    I hope it helps you.
    Bruno.

  • Custom reports in R12 not returning any data

    I'm seeing an issue of custom reports in R12 not returning any data. So far what I've been able to dig into is that the report query itself is referring to APPS synonyms that are secured under MOAC. What I am able to do is run the query in SQL Developer after having run mo_global.set_policy_context and I receive the data I'm looking for. This is not the case when running the report through the concurrent programs request.
    Secondly, I've also configured the concurrent program request to run as single operating unit mode. This aided in fixing any issues with LOVs on the parameter form. However, still no results from the report itself. I've also searched around quite extensively and added a P_CONC_PROGRAM_ID user parameter in reports developer, as well as adding SRW.USER_EXIT('FND SRWINIT') to the before report trigger and SRW.USER_EXIT('FND SRWEXIT') to the after report trigger as well. No luck. I've also tried running mo_global.set_policy_context on the before report trigger and no such luck.
    Has anyone seen similar issues with this and could shed some light? At this point, the workaround I would see is to just change the query to use respective all tables and match up against the orgid, but I'd rather not do that.

    I am facing exactly the same issue with 2 of my custom Reports in R12.1.3. We did our level best to find out the issue. It was always a hit and trial fix.
    But the following were our observations and workarounds
    0) The reports Conc Prog were in MOAC - Single mode. Both the reports had SRW INIT, EXIT and P_CONC_REQUEST_ID
    1) The reports which caused the issues[NO data fetched for MOAC] had multiple Queries in the data model and one Query fetches data and the 2nd one doesnt. Both the queries when run from SQL developer after setting the org gave results.
    Workaround for Report1
    a) We deleted the data link connecting the 2 columns in both the queries and added a bind variable instead in the 2nd /child query to refer to the column in the parent query and linked the 2 groups.
    Workaround for Report 2
    a) In report 2 the queries were not linked to each other. Only one query used to return results and the 2nd one returned 0 rows. The workaround was to use the "where" conditions as lexical parameters after having set the value for the same in before report trigger.
    Both the work around looks illogical. Still It worked..!
    Thanks
    Biju Radhakrishnan

  • How to know if the data model qry is not returning any data

    Hi
    If my report doesn't have data (meaning if the data model qry doesn't retreive any data), I wan't to show this text: "There is no data returned."
    My question is how would I know that the qry is not returning any data. I know I can create a text field, and write a trigger on it, to set it True or False depending on the fact that data is being returned or not.
    Thanks
    Shalu

    Hi,
    In Data Model create a summary column for function=count on one of your columns.
    Then for BeforeReport trigger you can write
    function BeforeReport return boolean is
    begin
    if :CS_RPT_NODATA > 0 then
    return (TRUE);
    end if;
    SRW.MESSAGE(300,'There is no data');
    return (FALSE);
    end;
    Regards, Gicu

  • Binocular search for Cost Center is not returning any data

    Hi Gurus,
    When clicking on the SRM-Shooping Cart-Cost Assignment- Account Assignment Overview- Cost center Binocular search icon,  it is not returning any data.  However,  when drilling down in the Account Assignment Overview, you will see another Binocular search icon for Cost Center which is working fine.
    Any idea of how you troubleshoot it.
    Thanks in advace for your help.
    HA

    Not sure about the cost assignment drill down, but after we applied SP13 to SRM server 550 the binoculars for cost center stopped working. the following note corrected this.
    Note 1259735 - Search help of generic account does not work
    If it has never worked, then probably need to setup a RFC dialog user for the F4 search help, Multiple threads on here around the dialog user for F4 with details on configuration and use.
    JF

  • Ibots not returning any data

    Hi,
    I have some ibots that I scheduled to run on a daily basis and which were working perfectly.
    Suddenly the same ibots, they run but the content of the attachment says "The specified criteria did not return any data".
    I checked the log files and could not see any relavant error.
    If I go back in the report that I am sending through the ibot, it runs without any problem.
    I tried to send it in different formats and run as different users, but the results are still the same!
    Any idea what else I could check?
    Type: Warning
    Severity: 50
    Time: Wed May 15 14:10:19 2013
    File: project/webodbcaccess/odbcconnectionimpl.cpp Line: 199
    Properties: RptPath-/shared/MICROS/giuliano/cube_build_verification;SID-btilnnapkfo2omg91a71b9m6n2;bindID-1;connID-31;ThreadID-4640;statementID-364;RSP-o:go~r:report
    Location:
         saw.odbc.statement.fetch
         saw.subsystem.portal.pdf
         saw.delivers.rpc.getDeviceContent
         saw.rpc.server.responder
         saw.rpc.server
         saw.rpc.server.handleConnection
         saw.rpc.server.dispatch
         saw.threadPool
         saw.threads
    SQLFetchScroll returned code SQL_NO_DATA_FOUND

    Thanks it solved the issue.
    But One more thing Now I have placed the parameters in the where clause of the query
    Query-
    select field1,field2,field3,field4,field5,job_name,candidate_name,interview_date from etc.ethr_irc_int_details
    where field1 is not null
    and job_name = :1
    and candidate_name = :2
    and interview_date = :3
    in the VO I am executing
    public void iniQuery(String S1, String S2,String S3)
    System.out.println("insdie ini query of the VO");
    System.out.println("S1 "+S1);
    System.out.println("S2 "+S2);
    System.out.println("S3 "+S3);
    this.setWhereClauseParams(null);
    this.setWhereClauseParam(0,S1);
    this.setWhereClauseParam(1,S2);
    this.setWhereClauseParam(2,S2);
    executeQuery();
    and in AM
    ETHRIntDetailsVOImpl IDVO = (ETHRIntDetailsVOImpl)this.getETHRIntDetailsVO();
    // IDVO.executeQuery();
    // OAViewObject IDVO = (OAViewObject)findViewObject("ETHRIntDetailsVO");
    IDVO.iniQuery(S1,S2,S3);
    Row row = IDVO.first();
    again I am not getting any data in the row??
    Any idea if I am doing any thing wrong..
    Please help urgently.
    Thanks
    Ashish

  • Wierd Coherence bug with keySet() / entrySet() not returning all data.

    So I have a cache with 3 key/values in it.
    If I call cache (over extend) with specific keys, i get all values back.
    Object valueA = namedCache.get("A");
    Object valueB = namedCache.get("B");
    Object valueC = namedCache.get("C");
    i.e. valueA/B/C are all not null.
    If I now try to use keySet()/entrySet(), I only get 1 value back.
    eg:
    int cacheSize= namedCache.size(); //cache size is 3
    int keySetSize = namedCache.keySet(); //cache size is 3
    int actualKeySetSize = (new HashSet(namedCache.keySet())).size(); // actual size is 1
    The same happens if I iterate over keyset/entryset, i.e. there is only 1 value in the result.
    I have 2 storage nodes, JMX shows 1 node has 1 unit and other node shows cache has 2 units.
    Are there any known bugs where above can occur, we are using Oracle Coherence GE 3.5.3/465p3.
    i.e. keySet/entrySet not returning full result sets!
    Cheers,
    Neville.

    Apparently a timing issue between the "creation" of a cache, and the processing of requests against that cache. Because of the nature of the cache creation protocol, it is possible for the client creating the cache to return before all storage members have been notified of the cache name. It is therefore possible for cache requests to arrive at a storage member before that member has had a chance to instantiate its backing map.
    Fix is part of 3.6.0 GA, and is now slated to be back ported for 3.5.3p8.
    Have tested against 3.6 and all looks ok now.

  • The statement did not return a result set in ireport

    Hi,
        I am Building a Report in iReport(Jasper Reports). I called a stored procedure from iReport by passing a parameter in Query Editor. I am getting an exception saying "The statement did not return a result set". When
    i use Temp Tables in stored procedure i am getting the exception.
    If there is no temptable in Stored procedure there wont be any exception.
    This is my Stored procedure
    Create PROCEDURE [XUSP_REPORT_SOPRINT] @BNUM VARCHAR(20) AS
    BEGIN
    DECLARE @FQTY BIGINT
    DECLARE @ITNAME VARCHAR(100)
    DECLARE @COUNT INT=0
    DECLARE @COUNT1 INT=0
    CREATE TABLE #BILL_PRINT(
        [BNUM] [varchar](20) NOT NULL,
        [CNAME] [varchar](30) NOT NULL,
        [CNUM] [int] NOT NULL,
        [ITNAME] [varchar](100) NOT NULL,
        [ITEM#] [int] NOT NULL,
        [QTY] [int] NOT NULL DEFAULT 0,
        [UNIT] [varchar](5) NOT NULL,
        [PRICE] [float] NOT NULL DEFAULT 0,
        [BASIC] [float] NOT NULL DEFAULT 0,
        [DISCOUNT] [float] NOT NULL DEFAULT 0,
        [FRQTY] [int] NOT NULL DEFAULT 0,
        [BADDR] [varchar](300) NULL,
        [CADDR] [varchar](300) NOT NULL,
        [BDATE] [datetime] NULL DEFAULT (sysdatetime()),
        [BILLBY] [varchar](50) NOT NULL,
        [ROUTE] [varchar](200) NULL,
        [AMT] [float] NOT NULL DEFAULT 0,
        [VAT] [float] NOT NULL DEFAULT 0,
        [VAT AMT] [float] NOT NULL DEFAULT 0,
        [AMT_AF_DISC] [float] NOT NULL DEFAULT 0,
        [AMT_AF_VAT] [float] NOT NULL DEFAULT 0,
        [TOT_DISC] [float] NOT NULL DEFAULT 0,
        [ROUND_OFF] [float] NOT NULL DEFAULT 0,
        [TOT_VAT] [float] NOT NULL DEFAULT 0,
        [AMT_UNDER_VAT] [float] NOT NULL DEFAULT 0,
        [NETT] [float] NOT NULL DEFAULT 0,
        [TOS] [varchar](30) NULL DEFAULT 0,
        [CDISC] [float] NOT NULL DEFAULT 0,
        [SDISC] [float] NOT NULL DEFAULT 0
    insert into #BILL_PRINT SELECT [BNUM]
          ,[CNAME]
          ,[CNUM]
          ,[ITNAME]
          ,[ITEM#]
          ,[QTY]
          ,[UNIT]
          ,[PRICE]
          ,[BASIC]
          ,[DISCOUNT]
          ,[FRQTY]
          ,[BADDR]
          ,[CADDR]
          ,[BDATE]
          ,[BILLBY]
          ,[ROUTE]
          ,[AMT]
          ,[VAT]
          ,[VAT AMT]
          ,[AMT_AF_DISC]
          ,[AMT_AF_VAT]
          ,[TOT_DISC]
          ,[ROUND_OFF]
          ,[TOT_VAT]
          ,[AMT_UNDER_VAT]
          ,[NETT]
          ,[TOS]
          ,[CDISC]
          ,[SDISC]
      FROM [SALES_DETAILS] WHERE BNUM=@BNUM
    CREATE TABLE #ITNAME_0
    ITEM VARCHAR(100) NOT NULL,
    FREE BIGINT NOT NULL
    INSERT INTO #ITNAME_0 SELECT ITNAME,FRQTY FROM SALES_DETAILS WHERE FRQTY<>0 AND BNUM=@BNUM
    --SELECT * FROM #ITNAME_0
    SET @COUNT=(SELECT COUNT(*) FROM #ITNAME_0)
    WHILE @COUNT!=0
    BEGIN
    SET @FQTY=(SELECT TOP(1) FREE FROM #ITNAME_0)
    SET @ITNAME=(SELECT TOP(1) ITEM FROM #ITNAME_0)
    SET @COUNT1=(SELECT COUNT(*) FROM #BILL_PRINT WHERE ITNAME=@ITNAME AND BNUM=@BNUM)
    IF @COUNT1=2
    BEGIN
        UPDATE #BILL_PRINT
        SET FRQTY+=@FQTY
        WHERE ITNAME=@ITNAME AND QTY<>0
        DELETE FROM #ITNAME_0 WHERE ITEM=@ITNAME AND FREE=@FQTY
        DELETE FROM #BILL_PRINT WHERE  ITNAME=@ITNAME AND QTY=0
    END
    SET @COUNT=@COUNT-1
    END
    --SELECT *FROM sales_details
    SELECT *FROM #BILL_PRINT where bnum=@bnum
    DROP TABLE #BILL_PRINT
    DROP TABLE #ITNAME_0
    END
    Please help me out in this.
    Thanks,
    Shreyas M

    This is a forum for Reporting Services (SSRS). If you're using Jasper reports then you should be posting in relevenat forums. I'm not sure there would be enough people with Jasper report experience here to help you out!
    Anyways in SSRS when  we use Temp tables in procedure it will throw exception in editor but when you save and run it will still work fine. Did you try saving it and executing report? Did the error still persisted?
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • Payroll extractor 0HR_PY_1 do not return any data in RSA3 in full mode

    Hi,
    I have activated Payroll extractor 0HR_PY_1.
    I use RSA3 to check the extractor.
    It does not return any data(0 records) in full mode.
    Do i need to do activate any other object, apart from the datasource?
    Thanks in advance  for your help.
    Regards,
    Suresh.

    Hi Suresh,
    HR extractors need additional authorizations. When the extractor is run, there would be a check if the user is authorized to extract data. Check SAP notes 672514 & 397208. Also find my previous post on this.
    Re: Extractor 0HR_PY_1 does not return data to BW
    Best Regards,
    Murali.

  • Boot loader did not return any data.

    Hi,
    i have installed the Oracle VM Server and Oracle VM Manager in two different machines. I'm using the VM Manager to create the Virtual Machines(guest). I followed all the steps given in the Oracle VM Manager User guide 2.2. I'm using the RHEL5 as the OS for the guest machine. I receive an error saying 'Boot loader did not return any data.'. The vm.cfg file has got created in the path /OVS/running_pool/12_VM1. The contents of the vm.cfg file are as below
    bootloader = '/usr/bin/pygrub'
    disk = ['file:/var/ovs/mount/616CC4FA976D4352B1630FFCE835FEC5/running_pool/14_VM1/System.img,xvda,w']
    keymap = 'en-us'
    memory = '1024'
    name = '14_VM1'
    on_crash = 'restart'
    on_reboot = 'restart'
    uuid = '3a925bc9-1555-b5bb-b0f0-c5958db65468'
    vcpus = 1
    vfb = ['type=vnc,vncunused=1,vnclisten=0.0.0.0,vncpasswd=vm123']
    vif = ['mac=00:16:3E:02:8B:64, bridge=xenbr0']
    Can any one help out in this ASAP.
    Thanks in Advance.

    re..
    sorry but did you installed guest OS or not ?
    Did you install from image, from dvd ...?
    If yes try start youre vm from server terminal
    #>xm create -c vm. cfg
    *T                                                                                                                                                                                                                                                                                                                                                       

  • BC4J - ViewObject not returning latest data

    BC4J - ViewObject not returning latest data. Some kind of EO/VO Cache Latency Issue.
    I have an edit page that presents a drop-down list which is suppose to display * un-assigned * messages, but does not. The drop-down list is using an <jbo:InputSelect> tag that gets values from a ViewObject (UnAssignedMessageView ) which issues the query listed below. Note, the ViewObject is not based on an Entity Object.
    (Query in UnAssignedMessageView)
    select      message.message_desc_short, message.message_id
    from     fmm.message
    where      message.message_id not in (select cardmessage.message_id from fmm.card_message)
    and message.message_id != 0     
    (from the edit.jsp)
    <jbo:ApplicationModule id="am" configname="com.maxmcbyte.fmm.model.ModelModule.ModelModuleLocal" releasemode="Reserved" />
    <jbo:DataSource id="ds" appid="am" viewobject="CardMessageView1" />           <<****** The VO where the inserts/updates are recorded.
    <jbo:DataSource id="ds2" appid="am" viewobject="MessageUnAssignedView" />     <<****** The VO for the unassigned message drop-down-list.
    The problem is at step 3.
    Starting with 3 Unassigned Messages.
    Step 1: enter new record AND select a MESSAGE_ID from the drop-down list.
    Step 2: commit the transaction.
    Step 3: enter another record AND select a MESSAGE_ID from the drop-down list.     <<****** the list should now be displaying 2 unassigned messages but is displaying 3.
    Note, if I check the database after step 3 using the same query as in the UnAssignedMessageView I get the correct result. I guess I'm not understanding how BC4J ViewObject Caching is working. It is strange that even after I commit the record that the cache is not updated.
    I have read the docs and will have to re-read them again * but * it would be REAL NICE to see an illustration of "A DAY IN THE LIFETIME OF DATA IN BC4J" for dummies like me.
    Can anyone tell me what I'm missing here AND what specifically needs to be done?
    Thanks All,
    Bill G...

    Well, I figured it out * BUT * this is the sort of thing that I'll bet stumps a lot of new users * AND * should be posted to a "Gotch-Ya" list.
    I'd still like to see an illustration of "A DAY IN THE LIFE OF DATA IN BC4J"
    Bill G...
    <jbo:ApplicationModule id="am" configname="com.maxmcbyte.fmm.model.ModelModule.ModelModuleLocal" releasemode="Reserved" />
    <jbo:DataSource id="ds1" appid="am" viewobject="CardMessageView1" />
    <jbo:DataSource id="ds2" appid="am" viewobject="MessageUnAssignedView" />
    <%-- adding this did the trick --%>
    <%
    ViewObject view2 = ds2.getRowSet().getViewObject();
    view2.executeQuery();
    view2.first();
    %>

  • Column not returning any data

    Hello,
    For some reason, the result set returned from the following query will not return one of the columns, and I am stumped. Any help would be appreciated. The column that is returning NULL, even though all the other columns return data is CHQ.CHECK_NO (Note: CHQ.CHECK_DATE is returning data just fine). CHQ.CHECK_NO is defined as Number 15,0
    SELECT INV.INVOICE_DATE, INV.VENDORNO, INV.INVOICE_NO, INV.INVOICE_AMOUNT, INV.DUE_DATE, CHQ.CHECK_NO, CHQ.CHECK_DATE, SPAY.COUNT1
    FROM APINVOICE INV, CHEQUE_DETAIL CHQDTL, CHEQUE CHQ,
    (SELECT VENDORNO, INVOICE_NO, COUNT(*) AS COUNT1
    FROM VISPAYMAS
    WHERE COMP_CODE_ACCT = 'M'
    GROUP BY VENDORNO, INVOICE_NO) SPAY
    WHERE INV.ID = CHQDTL.APINVOICE_ID (+) AND CHQDTL.CHEQUE_ID = CHQ.ID (+) AND INV.VENDORNO = SPAY.VENDORNO (+) AND
    INV.INVOICE_NO = SPAY.INVOICE_NO (+) AND (INV.VENDORNO = 'AV603') AND (INV.INVOICE_DATE <= '25-JUL-06') AND
    (INV.INVOICE_DATE >= '25-JUL-05')
    ORDER BY INV.INVOICE_DATE DESC

    After further checking, it appears that indeed all the CHECK_NO data is actually NULL for the result set I am querying. The fact that the CHECK_DATE was returning data lead me to believe that there would have to be a corresponding CHECK_NO.... guess NOT! :) Ugh, I just happened to get stuck with a really odd test result set. Thanks for the help! On trying a different VENDOR_NO in the query, it is returning CHECK_NO data. I'll have to inquire as to why there would be CHECK_DATE data and not a CHECK_NO... hmm.
    I did add the TO_DATE() function into my query, thanks for the tip.

  • ExtractValue not returning the data after dbms_xmlschema.CopyEvolve

    Hi ,
    I am facing the problem while selecting the value from the XMLTYPE table using extractValue.
    Here address field is newly added to schema and evolved . But unable to get the address field value .
    My procedures are like this
    SQL> declare
    2 res boolean;
    3 xmlschema xmltype := xmltype(
    4 '<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xdb="http://xmlns.oracle.com/xdb">
    5 <xsd:complexType name="t_person" xdb:SQLType="PERSONDT_T">
    6 <xsd:sequence>
    7 <xsd:element name="persondetails" type="persondetailsType"/>
    8 <xsd:element name="companyinfo" type="companyinfoType"/>
    9 <xsd:element name="salaryinfo" type="salaryinfoType"/>
    10 </xsd:sequence>
    11 </xsd:complexType>
    12 <xsd:complexType name="persondetailsType" xdb:SQLType="PERSONDETAILS_T">
    13 <xsd:sequence>
    14 <xsd:element name="personname" type="xsd:string" />
    15 <xsd:element name="personexperience" type="xsd:decimal" />
    16 </xsd:sequence>
    17 </xsd:complexType>
    18 <xsd:complexType name="companyinfoType" xdb:SQLType="COMPANYINFO_T">
    19 <xsd:sequence>
    20 <xsd:element name="companystartdate" type="xsd:date" />
    21 <xsd:element name="companystandard" type="xsd:decimal" />
    22 </xsd:sequence>
    23 </xsd:complexType>
    24 <xsd:complexType name="salaryinfoType" xdb:SQLType="SALARYINFO_T">
    25 <xsd:sequence>
    26 <xsd:element name="salary" type="xsd:decimal" />
    27 <xsd:element name="paymonth" type="xsd:string" />
    28 </xsd:sequence>
    29 </xsd:complexType>
    30 <xsd:element name="person" type="t_person" />
    31 </xsd:schema>');
    32 begin
    33 if (dbms_xdb.existsResource('/public/personDetails.xsd')) then
    34 dbms_xdb.deleteResource('/public/personDetails.xsd');
    35 end if;
    36 res := dbms_xdb.createResource('/public/personDetails.xsd',xmlschema);
    37 end;
    38 /
    PL/SQL procedure successfully completed.
    SQL> begin
    2 dbms_xmlschema.registerSchema ('www.PersonInfoUrl.com',xdburitype('/public/personDetails.xsd'),TRUE,TRUE,FALSE,TRUE);
    3 end;
    4 /
    PL/SQL procedure successfully completed.
    SQL> CREATE TABLE PERSON_COMP_TABLE
    2 (empId VARCHAR2(100) CONSTRAINT pk_PERSONCOMP PRIMARY KEY
    3 ,comments VARCHAR2(20)
    4 ,joindate DATE
    5 ,personjoininfo xmltype)
    6 XMLTYPE COLUMN personjoininfo XMLSCHEMA "www.PersonInfoUrl.com" element "person"
    7 /
    Table created.
    SQL> insert into PERSON_COMP_TABLE (empId ,comments ,joindate ,personjoininfo )
    2 values ('2006NEW312','RDDEPT','15-jan-2006',
    3 sys.XMLType.createXML(
    4 '<?xml version="1.0" encoding="UTF-8"?>
    5 <person xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="www.PersonInfoUrl.com">
    6 <persondetails>
    7 <personname>Robert </personname>
    8 <personexperience>4.5</personexperience>
    9 </persondetails>
    10 <companyinfo>
    11 <companystartdate>2004-07-24</companystartdate>
    12 <companystandard>3.9</companystandard>
    13 </companyinfo>
    14 <salaryinfo>
    15 <salary>2444.3</salary>
    16 <paymonth> june </paymonth>
    17 </salaryinfo>
    18 </person>'))
    19 /
    1 row created.
    SQL> select count(*) from PERSON_COMP_TABLE;
    COUNT(*)
    1
    SQL> declare
    xmlschema xmltype := xdburitype('/public/personDetails.xsd').getXML();
    res boolean;
    begin
    select insertChildXML(
    xmlschema,
    '/xsd:schema/xsd:complexType[@name="companyinfo"]/xsd:sequence',
    'xsd:element',
    xmltype('<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="address" type="xsd:string"
    'xmlns:xsd="http://www.w3.org/2001/XMLSchema"'
    into xmlSchema
    from dual;
    if (dbms_xdb.existsResource('/public/personDetails.xsd')) then
    dbms_xdb.deleteResource('/public/personDetails.xsd');
    end if;
    res := dbms_xdb.createResource('/public/newpersonDetails.xsd',xmlschema);
    end;
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:00.74
    SQL> commit;
    Commit complete.
    Elapsed: 00:00:00.56
    SQL> begin
    dbms_xmlschema.CopyEvolve
    xdb$string_list_t('www.PersonInfoUrl.com'),
    XMLSequenceType(xdburitype('/public/newpersonDetails.xsd').getXML()),
    null
    end;
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:08.49
    SQL> commit;
    Commit complete.
    Elapsed: 00:00:00.52
    SQL> select count(*) from PERSON_COMP_TABLE;
    COUNT(*)
    1
    SQL> insert into PERSON_COMP_TABLE (empId ,comments ,joindate ,personjoininfo )
    values ('1234PTR','DTSDDEPT','12-jan-2006',
    sys.XMLType.createXML(
    '<?xml version="1.0" encoding="UTF-8"?>
    <person xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="www.PersonInfoUrl.com">
    <persondetails>
    <personname>Julie </personname>
    <personexperience>3.5</personexperience>
    </persondetails>
    <companyinfo>
    <companystartdate>2005-11-21</companystartdate>
    <companystandard>3.9</companystandard>
    <address>santaclara</address>
    </companyinfo>
    <salaryinfo>
    <salary>2444.3</salary>
    <paymonth> june </paymonth>
    </salaryinfo>
    </person>'))
    1 row created.
    SQL> select count(*) from PERSON_COMP_TABLE;
    COUNT(*)
    2
    SQL> SELECT empid, extractValue(personjoininfo,'/person/companyinfo/address') FROM PERSON_COMP_TABLE
    2 /
    empid
    E
    1234PTR
    Here "address " is not returned. it has return the value "santaclara".
    How to solve this ?. Please advise
    Thanks
    Govinda

    After chasing down couple of silly mistakes I was able to get your example to work
    SQL> call dbms_xmlschema.deleteSchema ('www.PersonInfoUrl.com',4)
      2  /
    Call completed.
    SQL> declare
      2    res boolean;
      3    xmlschema xmltype := xmltype(
      4  '<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xdb="http://xmlns.oracle.com/xdb">
      5     <xsd:complexType name="t_person" xdb:SQLType="PERSONDT_T">
      6             <xsd:sequence>
      7                     <xsd:element name="persondetails" type="persondetailsType"/>
      8                     <xsd:element name="companyinfo" type="companyinfoType"/>
      9                     <xsd:element name="salaryinfo" type="salaryinfoType"/>
    10             </xsd:sequence>
    11     </xsd:complexType>
    12     <xsd:complexType name="persondetailsType" xdb:SQLType="PERSONDETAILS_T">
    13             <xsd:sequence>
    14                     <xsd:element name="personname" type="xsd:string"/>
    15                     <xsd:element name="personexperience" type="xsd:decimal"/>
    16             </xsd:sequence>
    17     </xsd:complexType>
    18     <xsd:complexType name="companyinfoType" xdb:SQLType="COMPANYINFO_T">
    19             <xsd:sequence>
    20                     <xsd:element name="companystartdate" type="xsd:date"/>
    21                     <xsd:element name="companystandard" type="xsd:decimal"/>
    22             </xsd:sequence>
    23     </xsd:complexType>
    24     <xsd:complexType name="salaryinfoType" xdb:SQLType="SALARYINFO_T">
    25             <xsd:sequence>
    26                     <xsd:element name="salary" type="xsd:decimal"/>
    27                     <xsd:element name="paymonth" type="xsd:string"/>
    28             </xsd:sequence>
    29     </xsd:complexType>
    30     <xsd:element name="person" type="t_person"/>
    31  </xsd:schema>');
    32  begin
    33    if (dbms_xdb.existsResource('/public/personDetails.xsd')) then
    34      dbms_xdb.deleteResource('/public/personDetails.xsd');
    35    end if;
    36    res := dbms_xdb.createResource('/public/personDetails.xsd',xmlschema);
    37  end;
    38  /
    PL/SQL procedure successfully completed.
    SQL> begin
      2    dbms_xmlschema.registerSchema ('www.PersonInfoUrl.com',xdburitype('/public/personDetails.xsd'),TRUE,TRUE,FALSE,TRUE);
      3  end;
      4  /
    PL/SQL procedure successfully completed.
    SQL> DROP TABLE PERSON_COMP_TABLE
      2  /
    Table dropped.
    SQL> CREATE TABLE PERSON_COMP_TABLE
      2  (
      3    empId VARCHAR2(100) CONSTRAINT pk_PERSONCOMP PRIMARY KEY
      4    ,comments VARCHAR2(20)
      5    ,joindate DATE
      6    ,personjoininfo xmltype
      7  )
      8  XMLTYPE COLUMN personjoininfo XMLSCHEMA "www.PersonInfoUrl.com" element "person"
      9  /
    Table created.
    SQL> insert into PERSON_COMP_TABLE (empId ,comments ,joindate ,personjoininfo )
      2  values ('2006NEW312','RDDEPT','15-jan-2006',
      3  XMLType(
      4  '<?xml version="1.0" encoding="UTF-8"?>
      5  <person xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="www.PersonInfoUrl.com">
      6     <persondetails>
      7             <personname>Robert </personname>
      8             <personexperience>4.5</personexperience>
      9     </persondetails>
    10     <companyinfo>
    11             <companystartdate>2004-07-24</companystartdate>
    12             <companystandard>3.9</companystandard>
    13     </companyinfo>
    14     <salaryinfo>
    15             <salary>2444.3</salary>
    16             <paymonth> june </paymonth>
    17     </salaryinfo>
    18  </person>'))
    19  /
    1 row created.
    SQL> select count(*) from PERSON_COMP_TABLE
      2  /
      COUNT(*)
             1
    SQL> declare
      2    xmlschema xmltype := xdburitype('/public/personDetails.xsd').getXML();
      3    res boolean;
      4  begin
      5    select insertChildXML
      6           (
      7             xmlschema,
      8             '/xsd:schema/xsd:complexType[@name="companyinfoType"]/xsd:sequence',
      9             'xsd:element',
    10             xmltype('<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="address" type="xsd:string"/>'),
    11             'xmlns:xsd="http://www.w3.org/2001/XMLSchema"'
    12           )
    13      into xmlSchema
    14      from dual;
    15
    16    if (dbms_xdb.existsResource('/public/newPersonDetails.xsd')) then
    17      dbms_xdb.deleteResource('/public/newPersonDetails.xsd');
    18    end if;
    19
    20    res := dbms_xdb.createResource('/public/newPersonDetails.xsd',xmlschema);
    21  end;
    22  /
    PL/SQL procedure successfully completed.
    SQL> commit
      2  /
    Commit complete.
    SQL> begin
      2    dbms_xmlschema.CopyEvolve
      3    (
      4       xdb$string_list_t('www.PersonInfoUrl.com'),
      5       XMLSequenceType(xdburitype('/public/newPersonDetails.xsd').getXML()),
      6       null
      7     );
      8  end;
      9  /
    PL/SQL procedure successfully completed.
    SQL> select count(*) from PERSON_COMP_TABLE
      2  /
      COUNT(*)
             1
    SQL> insert into PERSON_COMP_TABLE (empId ,comments ,joindate ,personjoininfo )
      2  values ('1234PTR','DTSDDEPT','12-jan-2006',
      3  XMLType(
      4  '<?xml version="1.0" encoding="UTF-8"?>
      5  <person xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="www.PersonInfoUrl.com">
      6     <persondetails>
      7             <personname>Julie </personname>
      8             <personexperience>3.5</personexperience>
      9     </persondetails>
    10     <companyinfo>
    11             <companystartdate>2005-11-21</companystartdate>
    12             <companystandard>3.9</companystandard>
    13             <address>santaclara</address>
    14     </companyinfo>
    15     <salaryinfo>
    16             <salary>2444.3</salary>
    17             <paymonth> june </paymonth>
    18     </salaryinfo>
    19  </person>'))
    20  /
    1 row created.
    SQL> commit
      2  /
    Commit complete.
    SQL> select count(*) from PERSON_COMP_TABLE
      2  /
      COUNT(*)
             2
    SQL> SELECT empid, extractValue(personjoininfo,'/person/companyinfo/address') FROM PERSON_COMP_TABLE
      2  /
    EMPID
    EXTRACTVALUE(PERSONJOININFO,'/PERSON/COMPANYINFO/ADDRESS')
    2006NEW312
    1234PTR
    santaclara
    SQL>The mistakes included the XPath used to insert the new element into the XML Schema
    You had
    '/xsd:schema/xsd:complexType[@name="companyinfo"]/xsd:sequence',
    where as the correct XPath is
    '/xsd:schema/xsd:complexType[@name="companyinfoType"]/xsd:sequence',
    and then you had
    if (dbms_xdb.existsResource('/public/personDetails.xsd')) then
    dbms_xdb.deleteResource('/public/personDetails.xsd');
    end if;
    res := dbms_xdb.createResource('/public/newpersonDetails.xsd',xmlschema);
    end;
    which means that once the document newpersonDetails.xsd had been created once a subsequent execution of the testcase would fail as the document would already exist.
    I'm also a little confused... Your testcase implies that you were able to insert the second document, but the number of rows in the table is still shown as 1 after the insert apparently succeeded. Since you did not correctly update the XML Schema before the calling copyEvolve I do not understand how your output shows that the second insert succeeded.

  • Very Very Urgent Issue: Restricted Key Figure does not return any data

    Hi all,
    Please help me solving this urgent issue.
    created customer exit variable on characterstics version and also
    other customer exit variable on Value type.
    I coded that in variable exit. Problem is when I include these in
    restrickted keyfigure My query does not return me any data.
    But if I remove from restrickted key firgure and put it as normal
    charaterstics I see the variable is getting populated.
    Also in RSRT the SQl generated when these are included in RKF is not
    correct.
    I debugged and know they are getting populated. As when included in RKF
    I can also see the values of customer exit variables from information
    tab.
    I also know that there is data in cube for those restrictions.
    I posted one OSS Notes regarding this urgent issue. But got no reply from SAP.
    FYI: We are using BEx 3.5 Browser SAP GUI 6.4 Patch 20 BW Patch 11
    Thanks
    SAP BW
    **Please do not post the same question twice: Very Urgent Issue: Restricted Key Figure does not return any data

    Hi,
    Everyone out there this is very urgent. If someone can help me solving this problem.
    We are using BEx 3.5 Browser SAP GUI 6.4 Patch 20 BW Patch 11.
    I posted one oss notes also regarding this issue. But got no reply from SAP.
    So, Please help me solving this issue.
    Thanks
    SAP BW

  • Query for file version less than 10.0 does not return expected data

    I'm trying to build a query for all PCs that have a version of Iexplore.exe in c:\windows\program files\ that is less than 10.0 .  When I run the query it returns no data. When I change 10.0 in the query to 9.9 it returns files with version 10.xxx in
    the results.  Its as if it is seeing 10.0 as 1.0.   Is this expected ?
    select SMS_R_System.Name, SMS_R_System.ADSiteName, SMS_G_System_SoftwareFile.FileName, SMS_G_System_SoftwareFile.FileVersion from  SMS_R_System inner join SMS_G_System_SoftwareFile on SMS_G_System_SoftwareFile.ResourceID = SMS_R_System.ResourceId where
    SMS_G_System_SoftwareFile.FileName = "iexplore.exe" and SMS_G_System_SoftwareFile.FilePath = "C:\\program files\\internet explorer\\" and SMS_G_System_SoftwareFile.FileVersion < "9.9"

    It is because the values are not integer, they are a string. And therefore 1 is smaller then 9.
    http://www.enhansoft.com/

Maybe you are looking for