Help required in extract functionality for xml with namespaces

Hi,
We recently upgraded our database from 9i to 10G. After the upgrade few queries are not working as expected. Below query does not fetch any results in 10G but works perfectly fine in 9i. Could you please help me with a work around.
select XMLType.extract(xmltype('<?xml version="1.0" encoding="UTF-8"?>
<hierarchy docVersion="1" documentID="4738800" enddate="4999-12-31T00:00:00.000" isCurrentVersion="true" isEditable="true" startdate="2007-05-21T13:06:58.737" uniqueID="4738800" xmlns="http://schema/hierarchy" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://schema/hierarchy http://schema/hierarchy.xsd">
<name>tshiiiiiiiiiiii</name>
<description>tshiiiiiiiiiiii</description>
<find_duplicates_on_save>false</find_duplicates_on_save>
<root href="http://node?/node/@documentID=123" label="root" type="locator"/>
<connection to="root" type="simple"/>
</hierarchy>
'),'//*/@xmlns').getClobVal() as "XMLNS" from dual;
result : http://schema/hierarchy
We dont want to use '//*/namespace::*' in the xpath as it will give us xsi value along with xmlns. Oracle metalink says its a bug in oracle 10g version (bug 5100590) but couldnot find workaround. Please help us.
Thanks and Regards
Shifali

Re: Adding report (query & workbook, templates) in roles
Go through this thread.
And in our Project we have created one role for accessing workbooks. in that end user can access the work book but saved one and user cannot resave or delete the work book.
we have added Auth objects S_TCODE and S_GUI.
in S_TCODE we have added RRMX and in S_GUI we have given 60(IMPORT) access to the users.
So that they can just share the workbook. nothing else can be done.
Try like this. Hope this would help you.

Similar Messages

  • Namespace not found error when creating data server for xml with namespace

    Hi
    I tried creating XML data server in ODI with namespace in xml file. I followed the below steps but could not success in creating the dataserver. however when I remove the namespace in xml file I am able to reverse engineer the xml file.
    1) Create xml data server
    2) select xml driver - com.sunopsis.jdbc.driver.xml.SnpsXmlDriver
    3) Provide the jdbc url - jdbc:snps:xml?f=D:/xmlnew/sample_namespace.xml&s=xmlns&d=D:/xmlnew/sample_namespace.dtd
    xml content
    <f:root xmlns:f="http://www.w3.org/TR/html4/">
    <table>
    <name>African Coffee Table</name>
    <width>80</width>
    <length>120</length>
    </table>
    </f:root>
    DTD content
    <!ELEMENT f:root ( table ) >
    <!ELEMENT length ( #PCDATA ) >
    <!ELEMENT name ( #PCDATA ) >
    <!ELEMENT table ( name, width, length ) >
    <!ELEMENT width ( #PCDATA ) >
    when I test connection it shows the following error.
    java.sql.SQLException: The model generated by the model mapper was not accepted by a validator: Model not accepted: Namespace not found:
         at oracle.odi.jdbc.datasource.LoginTimeoutDatasourceAdapter.doGetConnection(LoginTimeoutDatasourceAdapter.java:133)
         at oracle.odi.jdbc.datasource.LoginTimeoutDatasourceAdapter.getConnection(LoginTimeoutDatasourceAdapter.java:62)
         at com.sunopsis.sql.SnpsConnection.testConnection(SnpsConnection.java:1100)
         at com.sunopsis.graphical.dialog.SnpsDialogTestConnet.getLocalConnect(SnpsDialogTestConnet.java:371)
         at com.sunopsis.graphical.dialog.SnpsDialogTestConnet.localConnect(SnpsDialogTestConnet.java:794)
         at com.sunopsis.graphical.dialog.SnpsDialogTestConnet.jButtonTest_ActionPerformed(SnpsDialogTestConnet.java:754)
         at com.sunopsis.graphical.dialog.SnpsDialogTestConnet.connEtoC1(SnpsDialogTestConnet.java:137)
         at com.sunopsis.graphical.dialog.SnpsDialogTestConnet.access$1(SnpsDialogTestConnet.java:133)
         at com.sunopsis.graphical.dialog.SnpsDialogTestConnet$IvjEventHandler.actionPerformed(SnpsDialogTestConnet.java:87)
         at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
         at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
         at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
         at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
         at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
         at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:272)
         at java.awt.Component.processMouseEvent(Component.java:6289)
         at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
         at java.awt.Component.processEvent(Component.java:6054)
         at java.awt.Container.processEvent(Container.java:2041)
         at java.awt.Component.dispatchEventImpl(Component.java:4652)
         at java.awt.Container.dispatchEventImpl(Container.java:2099)
         at java.awt.Component.dispatchEvent(Component.java:4482)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
         at java.awt.Container.dispatchEventImpl(Container.java:2085)
         at java.awt.Window.dispatchEventImpl(Window.java:2478)
         at java.awt.Component.dispatchEvent(Component.java:4482)
         at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:644)
         at java.awt.EventQueue.access$000(EventQueue.java:85)
         at java.awt.EventQueue$1.run(EventQueue.java:603)
         at java.awt.EventQueue$1.run(EventQueue.java:601)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
         at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
         at java.awt.EventQueue$2.run(EventQueue.java:617)
         at java.awt.EventQueue$2.run(EventQueue.java:615)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:614)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
         at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
    Caused by: java.sql.SQLException: The model generated by the model mapper was not accepted by a validator: Model not accepted: Namespace not found:
         at com.sunopsis.jdbc.driver.xml.SnpsXmlDTD.initialize(SnpsXmlDTD.java:389)
         at com.sunopsis.jdbc.driver.xml.SnpsXmlDTD.initialize(SnpsXmlDTD.java:421)
         at com.sunopsis.jdbc.driver.xml.SnpsXmlDTD.<init>(SnpsXmlDTD.java:150)
         at com.sunopsis.jdbc.driver.xml.SnpsXmlSchema.<init>(SnpsXmlSchema.java:478)
         at com.sunopsis.jdbc.driver.xml.SnpsXmlSchemaManager.createNewSchema(SnpsXmlSchemaManager.java:292)
         at com.sunopsis.jdbc.driver.xml.SnpsXmlSchemaManager.getSchemaFromProperties(SnpsXmlSchemaManager.java:270)
         at com.sunopsis.jdbc.driver.xml.SnpsXmlDriver.connect(SnpsXmlDriver.java:114)
         at oracle.odi.jdbc.datasource.DriverManagerUtils$DriverProxy.connect(DriverManagerUtils.java:23)
         at oracle.odi.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriverManager(DriverManagerDataSource.java:368)
         at oracle.odi.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriverManager(DriverManagerDataSource.java:352)
         at oracle.odi.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriverManager(DriverManagerDataSource.java:316)
         at oracle.odi.jdbc.datasource.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:275)
         at oracle.odi.jdbc.datasource.LoginTimeoutDatasourceAdapter.doGetConnection(LoginTimeoutDatasourceAdapter.java:99)
         at oracle.odi.jdbc.datasource.LoginTimeoutDatasourceAdapter.getConnection(LoginTimeoutDatasourceAdapter.java:62)
         at oracle.odi.jdbc.datasource.LoginTimeoutDatasourceAdapter$ConnectionProcessor.run(LoginTimeoutDatasourceAdapter.java:217)
         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
         at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
         at java.util.concurrent.FutureTask.run(FutureTask.java:138)
         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
         at java.lang.Thread.run(Thread.java:662)

    Hi,
    Thans for your reply.
    This is the DTD for my xmldoc.
    <!ELEMENT Data (Department+)>
    <!ELEMENT EmployeeID (#PCDATA)>
    <!ATTLIST EmployeeID col (EMPID) #IMPLIED>
    <!ELEMENT Education (EmployeeID, Sequence, Dgree)>
    <!ATTLIST Education table NMTOKEN #IMPLIED>
    <!ELEMENT Employee (EmployeeName, EmployeeID, DepartmentID, Education*)>
    <!ATTLIST Employee table NMTOKEN #IMPLIED>
    <!ELEMENT EmployeeName (#PCDATA)>
    <!ATTLIST EmployeeName col NMTOKEN #IMPLIED>
    <!ELEMENT DepartName (#PCDATA)>
    <!ATTLIST DepartName col NMTOKEN #IMPLIED>
    <!ELEMENT Table (Column+)>
    <!ATTLIST Table importType NMTOKEN #IMPLIED>
    <!ATTLIST Table parentTable NMTOKEN #IMPLIED>
    <!ATTLIST Table tag NMTOKEN #IMPLIED>
    <!ATTLIST Table columns NMTOKEN #IMPLIED>
    <!ATTLIST Table name NMTOKEN #IMPLIED>
    <!ELEMENT DepartID (#PCDATA)>
    <!ATTLIST DepartID col NMTOKEN #IMPLIED>
    <!ELEMENT MetaData (Table+)>
    <!ELEMENT Sequence (#PCDATA)>
    <!ATTLIST Sequence col NMTOKEN #IMPLIED>
    <!ELEMENT Dgree (#PCDATA)>
    <!ATTLIST Dgree col NMTOKEN #IMPLIED>
    <!ELEMENT Export (MetaData, Data)>
    <!ELEMENT DepartmentID (#PCDATA)>
    <!ATTLIST DepartmentID col NMTOKEN #IMPLIED>
    <!ELEMENT Column (#PCDATA)>
    <!ATTLIST Column deleteKey NMTOKEN #IMPLIED>
    <!ATTLIST Column isKey NMTOKEN #IMPLIED>
    <!ELEMENT Department (DepartName, DepartID, Employee+)>
    <!ATTLIST Department table NMTOKEN #IMPLIED>
    Thanks again!
    Yan

  • Extract function (For XML)

    Hi,
    I need to extract values from the following XML block where I need to extract the value of TDEXPIRYDATE (20120707):
    <?xml version="1.0" encoding="UTF-8"?>
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
         <soapenv:Body>
              <m:EEODEN01_Response xmlns:m="http://entirex/rop">
                   <TDEXPIRYDATE>20120707</TDEXPIRYDATE>
                   <TD-ISSUE-PLACE>999</TD-ISSUE-PLACE>
                   <PASSPORT-LANG>1</PASSPORT-LANG>
              </m:EEODEN01_Response>
         </soapenv:Body>
    </soapenv:Envelope>
    How can this be done , I mean what is the XPAth to be passed to the function extract?
    Thanks in advance
    Regards
    AK

    michaels>  with t as (
    select xmltype('<?xml version="1.0" encoding="UTF-8"?>
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">                                                                                                                                                                                                                                                                                          
      <soapenv:Body>                                                                                                                                                                                                                                                                                                                                                                                                                                                         
        <m:EEODEN01_Response xmlns:m="http://entirex/rop">                                                                                                                                                                                                                                                                                                                                                                                                                   
          <TDEXPIRYDATE>20120707</TDEXPIRYDATE>                                                                                                                                                                                                                                                                                                                                                                                                                              
          <TD-ISSUE-PLACE>999</TD-ISSUE-PLACE>                                                                                                                                                                                                                                                                                                                                                                                                                               
          <PASSPORT-LANG>1</PASSPORT-LANG>                                                                                                                                                                                                                                                                                                                                                                                                                                   
        </m:EEODEN01_Response>                                                                                                                                                                                                                                                                                                                                                                                                                                               
      </soapenv:Body>                                                                                                                                                                                                                                                                                                                                                                                                                                                        
    </soapenv:Envelope>
    ') xml from dual)
    select extractvalue(xml, '//TDEXPIRYDATE/text()') tdexpirydate from t t
    TDEXPIRYDATE  
    20120707 

  • Extract function for xmltype replaces ~ (tilde) with ']]]'

    Hi,
    In 10.2.0.4 when extracting fragment using xpath and extract function is replacing ~ with ]]]. strange thing is, it happens with only one ~ though there are many ~ in the xml.
    Has anyone faced similar issue with extract() function ?
    Thanks,
    vivek

    This turned out to be a bug. It was resolved through a patch developed.

  • Calendar has been non-functional for hours, with small screen saying "Moving calendars to server account..." Help?

    Calendar on Mavericks MacPro has been non-functional for hours, with small screen saying "Moving calendars to server account..." How can I restore its function?

    Sorry. I found some other advice that solved the problem ere I saw your response.
    The advice was:
    Go to Finder. Holding "Option" key, find Library in "Go" pull down menu.   In Library. Select Calendars. To desktop, drag all files with the word "cache." Then go to Preferences (still in Library) and drag to desktop "com.apple.ical.plist".  Restart. Now Calendar is working perfectly, and rechecking under Library, the caches files and the com.apple.ical.plist  that were dragged to the desktop have reappeared in Calendars and Preferences.
    All is well. Many thanks for your reply! Sorry that I did not get to check it out.

  • [svn] 2569: Adding [HostComponent] metadata functionality for use with Gumbonent skins to provide a

    Revision: 2569
    Author: [email protected]
    Date: 2008-07-22 13:55:02 -0700 (Tue, 22 Jul 2008)
    Log Message:
    Adding [HostComponent] metadata functionality for use with Gumbonent skins to provide a
    strongly typed reference (hostComponent) back to the owning component, automagically.
    Reviewer: Paul (Compiler), Ryan (SDK)
    QA: Yes
    Modified Paths:
    flex/sdk/trunk/development/eclipse/flex/flex4/.actionScriptProperties
    flex/sdk/trunk/frameworks/projects/flex4/build.xml
    flex/sdk/trunk/frameworks/projects/flex4/src/flex/core/SkinnableComponent.as
    flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/ApplicationSkin.mxml
    flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/ButtonSkin.mxml
    flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/CheckBoxSkin.mxml
    flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/HScrollBarSkin.mxml
    flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/HScrollBarThumbSkin.mxml
    flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/HScrollBarTrackSkin.mxml
    flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/HSliderSkin.mxml
    flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/HSliderThumbSkin.mxml
    flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/HSliderTrackSkin.mxml
    flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/ItemsComponentSkin.mxml
    flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/ListSkin.mxml
    flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/PanelSkin.mxml
    flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/RadioButtonSkin.mxml
    flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/ScrollBarDownButtonSkin.mxml
    flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/ScrollBarLeftButtonSkin.mxml
    flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/ScrollBarRightButtonSkin.mxml
    flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/ScrollBarUpButtonSkin.mxml
    flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/SelectorSkin.mxml
    flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/SpinnerDecrButtonSkin.mxml
    flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/SpinnerIncrButtonSkin.mxml
    flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/SpinnerSkin.mxml
    flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/TextAreaSkin.mxml
    flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/TextInputSkin.mxml
    flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/ToggleButtonSkin.mxml
    flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/VScrollBarSkin.mxml
    flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/VScrollBarThumbSkin.mxml
    flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/VScrollBarTrackSkin.mxml
    flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/VSliderSkin.mxml
    flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/VSliderThumbSkin.mxml
    flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/VSliderTrackSkin.mxml
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/CompilationUnit.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/as3/SyntaxTreeEvaluator.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/ImplementationCompiler.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/lang/StandardDefs.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler_en.properties
    Added Paths:
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/as3/HostComponentEvaluator.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/as3/HostComponentExtension.java

    Try assigning a rollover to each conatiner mc as it is created...
    scrollerBase["imageHolder" + i].onRollOver = function(){
          trace("SUCCESS");

  • Help in using listagg function for more than 8000 char.

    Hi Friends,
    Need you urgent help in using listagg function for more than 8000 char.
    I did the below sample SQL and in "e_orig" and "d_orig" for upto 4000 char it is working fine but I have to use it for more than 8000 char. and it is giving error,
    I checked the listagg function is having limitation of 4000 char.
    I tried but I am unable to achive this. Can someone provide me a sample example to achive this
    select d.dname,d.loc,e.hiredate
    ,listagg(e.ename,',' ) within group (order by e.deptno) over (partition by e.deptno) as e_orig
    ,listagg(e.ename, ',') within group (order by e.sal) over (partition by e.deptno) as d_orig
    from emp e, dept d
    where e.deptno=d.deptno;[ This is my first post, I gone through the guideline for posting a post , and try to go according to that ( I have not pasted here create table and insert as I have used basic table emp, dept for example), please let me know if still I should give this, I will take care from my next post ]
    Thanks in advance

    Interesting, I didn't know you could do that, but...
    BluShadow wrote:
    You could write some PL/SQL code that does it all for you, but that would involve loops and would be slow.Well, objects are written in PL/SQL aren't they? And presumably there'll be implicit looping too? So it's not at all obvious that this method will be faster than doing the joining in PL/SQL in memory. The only way to find out is to benchmark them - so I have done that.
    I noticed that OP's ref cursor actually only ever retrieves a single record for a bound department number, so I decided the best thing would be to test using a procedure that passes an output string back. I selected all (109) employees and put spaces in to ensure above 4000 characters. I also noticed that as he is using PL/SQL he probably can use a VARCHAR2 type, but just not ListAgg in the query, so I wrote short procedures as follows:
    SimpleAggChr     - bulk collect and array processing, VARCHAR2 output
    ClobAggPrc     - the custom aggregation method, CLOB output
    SimpleAggClob     - bulk collect and array processing, CLOB output
    I then wrote a driving script that calls them in the order above and times each call (I like benchmarking so I have my own timing object to make it easy). I then print the lengths for checking, and my object writes the timings to my output table. Running a few times I got varying results, but generally it looks like there isn't a lot to choose between them for performance.
    Here's the procedure code:
    CREATE OR REPLACE TYPE char100_list_type AS TABLE OF VARCHAR2(100)
    CREATE OR REPLACE PROCEDURE SimpleAggChr (x_out OUT VARCHAR2) IS
      l_enames     char100_list_type;
    BEGIN
      SELECT first_name || '                                        ' || last_name
        BULK COLLECT INTO l_enames
        FROM employees
       ORDER BY salary;
      FOR i IN 1..l_enames.COUNT LOOP
        x_out := x_out || l_enames(i) || ',';
      END LOOP;
    END SimpleAggChr;
    CREATE OR REPLACE PROCEDURE SimpleAggClob (x_out OUT CLOB) IS
      l_enames     char100_list_type;
    BEGIN
      SELECT first_name || '                                        ' || last_name
        BULK COLLECT INTO l_enames
        FROM employees
       ORDER BY salary;
      FOR i IN 1..l_enames.COUNT LOOP
        x_out := x_out || l_enames(i) || ',';
      END LOOP;
    END SimpleAggClob;
    SHO ERR
    PROMPT ClobAggPrc
    CREATE OR REPLACE PROCEDURE ClobAggPrc (x_out OUT CLOB) IS
    BEGIN
      SELECT clobagg(first_name || '                                        ' || last_name || ',')
        INTO x_out
        FROM employees
       ORDER BY salary;
    END ClobAggPrc;
    SHO ERRand the driving script:
    SET SERVEROUTPUT ON
    SET TIMING ON
    DECLARE
      l_enames_c1     CLOB;
      l_enames_c2     CLOB;
      l_enames_v     VARCHAR2(32767);
      l_timer     timer_set_type := timer_set_type ('Aggregation');
    BEGIN
      Utils.g_id := 'Aggregation';
      SimpleAggChr (l_enames_v);
      l_timer.Increment_Time ('SimpleAggChr');
      ClobAggPrc (l_enames_c1);
      l_timer.Increment_Time ('ClobAggPrc');
      SimpleAggClob (l_enames_c2);
      l_timer.Increment_Time ('SimpleAggClob');
      DBMS_Output.Put_Line ('SimpleAggChr returned string of length ' || Length (l_enames_v));
      DBMS_Output.Put_Line ('ClobAggPrc returned string of length ' || Length (l_enames_c1));
      DBMS_Output.Put_Line ('SimpleAggClob returned string of length ' || Length (l_enames_c2));
      l_timer.Write_Times;
    END;
    SET TIMING OFF
    SET LINES 150
    SET PAGES 1000
    COLUMN id FORMAT A30
    COLUMN line_text FORMAT A120
    SELECT line_text
      FROM output_log
    WHERE id = 'Aggregation'
    ORDER BY line_ind
    /and the results:
    SimpleAggChr returned string of length 5779
    ClobAggPrc returned string of length 5779
    SimpleAggClob returned string of length 5779
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:27.05
    LINE_TEXT
    Timer Set: Aggregation, constructed at 03 Nov 2011 16:27:07, written at 16:27:35
    ================================================================================
    [Timer timed: Elapsed (per call): 0.02 (0.000016), CPU (per call): 0.01 (0.000010), calls: 1000, '***' denotes corrected
    line below]
    Timer              Elapsed          CPU          Calls        Ela/Call        CPU/Call
    SimpleAggChr          9.84         0.36              1         9.84400         0.36000
    ClobAggPrc            9.37         0.32              1         9.37400         0.32000
    SimpleAggClob         8.25         0.22              1         8.25000         0.22000
    (Other)               0.00         0.00              1         0.00000         0.00000
    Total                27.47         0.90              4         6.86700         0.22500
    13 rows selected.

  • Unable to locate Spring NamespaceHandler for XML schema namespace

    I am not sure if this is the best practice approach but this is the problem I am ruining into. Below, I explain what I am doing:
    1) What I am doing:
    =============
    Based on the oracle incubator example (http://coherence.oracle.com/display/INCUBATOR/Processing+Pattern+Examples); I am running a server and submitting tasks through a proxy application that submits them to ProcessingPatternConfigurator; let's call my task processReport.
    a) my processReport is using spring and ibatis together, I created a utility static class to obtain a spring context and retrieves beans using the following lines ( see exhibit "A1 and A2" below).
    b) when my task calls the context and that spring loads, it is failing with the error show in exhibit "B".
    I suspect I am missing a lib? I googled the error and searched you site but could find a meaningful discussion on it. I guess my question is if this is not the best approach, how do I integrated with spring initializing beans and setting up ibatis framwork, providing beans and database access through Ibatis for each task ruining on the grid (processReport).
    thanks
    A1) processReport (submitted in the grid) uses this line
    AbstractXmlApplicationContext ctx = (AbstractXmlApplicationContext) AmrContextUtil.getInstance();
              System.out.println("Classpath loaded. Executing Report...");
              ReportProcessor repProcessor = (ReportProcessor) ctx.getBean("reportProcessor");
    A2) Here is the AmrContextUtil:
    import org.springframework.context.support.AbstractApplicationContext;
    import org.springframework.context.support.ClassPathXmlApplicationContext;
    public final class AmrContextUtil {
         private static AbstractApplicationContext ctx = null;
         public AmrContextUtil() {
              super();
         public final static synchronized AbstractApplicationContext getInstance(){
              if (ctx == null){
                   ctx = new ClassPathXmlApplicationContext("classpath:config/applicationContext.xml");
                   setCtx(ctx);
              return ctx;
         public final static synchronized AbstractApplicationContext getCtx() {
              return ctx;
         public final static synchronized void setCtx(AbstractApplicationContext ctx) {
              AmrContextUtil.ctx = ctx;
    B) Here is the error reported by the server:
    2010-02-10 15:42:28.312/57.986 Oracle Coherence GE 3.5.2/463 <Warning> (thread=GridExecutor:Thread-2
    , member=1): TaskRunner - Failed to process 0x00000126B99E5524AC1F007AAB1587BBCFEC5E6637E1DED6CCB984
    03D6AADF4D due to:org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Failed to import bean definitions from URL location [classpath:config/reports-application.xml] Offending resource: class path resource [config/applicationContext.xml]; nested exception is org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unexpected failure during bean definition parsing
    Offending resource: class path resource [config/reports-application.xml] Bean 'reportSqlMapConfig'; nested exception is org.springframework.beans.factory.parsing.BeanDefinitionParsingException: *Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.springframework.org/schema/util]*
    *Offending resource: class path resource [config/reports-application.xml] Bean 'reportSqlMapConfig'*
    -> Property 'resourceMap'
    c)Here is my application-context.xml offending line:
    <bean id="reportSqlMapConfig"
    class="com.xx.report.generator.ReportSqlMapConfig">
    <property name="resourceMap">
    <map>
    <entry>
    <key>
    <util:constant static-field="com.xx.report.domain.ReportType.FPA"/>
    </key>
    <value>classpath:config/diehardReportSqlMapConfig.xml</value>
    </entry>
    <entry>
    <key>
    <util:constant static-field="com.xx.report.domain.ReportType.FCN"/>
    </key>
    <value>classpath:config/falconReportSqlMapConfig.xml</value>
    </entry>
    <entry>
    <key>
    <util:constant static-field="com.xx.report.domain.ReportType.ODS"/>
    </key>
    <value>classpath:config/odsReportSqlMapConfig.xml</value>
    </entry>
    </map>
    </property>
    </bean>

    My guess is that something is broken in the configuration of the cacheServer and its not finding
    all of the dependencies that your process pattern application needs. Probably the best way
    to debug this stuff is to define a static main in your runnable task which will make the call
    to the run() method and invoke it as the main class using the identical settings (classpath,
    run directory) that you are using to launch the Coherence cache server.
    Regards,
    Bob

  • Extract function not working with tag attributes

    Hi all,
    I have an xml document stored in the db as an xmlType. I am trying to use the extract function to retrieve values. The extract will work fine on tags without attributes. Any tags with attributes or tags beyond the tags with attributes will not be accessible.
    <tag1>
    <tag2>hi</tag2>
    <tag3 att="hello">bye</tag3>
    <tag4> hi again </tag4>
    </tag1>
    In the example above I can extract tag2 values but not tag3 or tag4 values.
    here is my select statement
    works
    select e.xmlval.extract('/tag1/tag2').getStringval()
    from test_xml e;
    does not work
    select e.xmlval.extract('/tag1/tag2/tag3').getStringval()
    from test_xml e;
    does not work
    select e.xmlval.extract('/tag1/tag2/tag3/tag4').getStringval()
    from test_xml e;
    Any ideas?

    Hi all,
    Found the issue. The problem was that I was not specifying the second argument to the extract function.
    The tag attribute that I was not handling was xmlns="".
    I used this atttribute as the second argument in the extract function and now I am off and running.
    Hope this helps someone.
    Cheers

  • How to extract  XML with namespace?

    Hi all,
    Below is the XML i have :
    <?xml version="1.0" encoding="UTF-8" ?>
    - <Transaction xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.test.com/Support/Services/test1/2012" xsi:schemaLocation="http://schemas.test.com/Support/Services/test1/2012 Support.test1.v1.xsd">
    - <Request>
    <Memid>10</Memid>
    <Actid>32</Actid>
    <Pax>3</Pax>
    <Flt>2012-DEC-10</Flt>
    <Username>WebUserNameTest</Username>
    </Request>
    <Request>
    <Memid>1</Memid>
    <Actid>3</Actid>
    <Pax>2</Pax>
    <Flt>2012-DEC-12</Flt>
    <Username>WebUserNameTest</Username>
    </Request>
    </Transaction>
    I want to extract the element values :
    The below code will help me when i have no namespace , what must be done in order to work with namespace and etract element value
    v_string_xml :=
    ' //Request[' || TO_CHAR (counter_xml) || ']/Memid/text()';
    v_ssp_table (v_ssp_table.COUNT).memid :=
    p_xml_in.EXTRACT (v_string_xml).getnumberval ();
    v_string_xml :=
    '//Request[' || TO_CHAR (counter_xml) || ']/Actid/text()';
    v_ssp_table (v_ssp_table.COUNT).actid :=
    p_xml_in.EXTRACT (v_string_xml).getnumberval ();
    v_string_xml :=
    '//Request['
    || TO_CHAR (counter_xml)
    || ']/Pax/text()';
    v_ssp_table (v_ssp_table.COUNT).pax :=
    p_xml_in.EXTRACT (v_string_xml).getnumberval ();
    v_string_xml :=
    '//Request[' || TO_CHAR (counter_xml) || ']/Flt/text()';
    v_ssp_table (v_ssp_table.COUNT).flt :=
    p_xml_in.EXTRACT (v_string_xml).getstringval ();
    v_string_xml :=
    '//Request['
    || TO_CHAR (counter_xml)
    || ']/Username/text()';
    v_ssp_table (v_ssp_table.COUNT).username :=
    p_xml_in.EXTRACT (v_string_xml).getstringval ();

    declare
      v_xml xmltype := xmltype( '<?xml version="1.0" encoding="UTF-8" ?>
    <Transaction xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.test.com/Support/Services/test1/2012" xsi:schemaLocation="http://schemas.test.com/Support/Services/test1/2012 Support.test1.v1.xsd">
    <Request>
    <Memid>10</Memid>
    <Actid>32</Actid>
    <Pax>3</Pax>
    <Flt>2012-DEC-10</Flt>
    <Username>WebUserNameTest</Username>
    </Request>
    <Request>
    <Memid>1</Memid>
    <Actid>3</Actid>
    <Pax>2</Pax>
    <Flt>2012-DEC-12</Flt>
    <Username>WebUserNameTest</Username>
    </Request>
    </Transaction>' );
    begin
      for r_xml in ( select *
                     from xmltable( xmlnamespaces( default 'http://schemas.test.com/Support/Services/test1/2012' )
                                   , '/Transaction/Request'
                                   passing v_xml
                                     columns memid number path 'Memid'
                                           , actid number path 'Actid'
                                           , pax number path 'Pax'
                                           , flt varchar2(100) path 'Flt'
                                           , username varchar2(100) path 'Username'
      loop
        dbms_output.put_line( r_xml.memid );
        dbms_output.put_line( r_xml.actid );
        dbms_output.put_line( r_xml.pax );
        dbms_output.put_line( r_xml.flt );
        dbms_output.put_line( r_xml.username );
      end loop;
    end;

  • Help Required in Authorization Roles for Workbooks

    Hi All,
    In our project, we have a requirement of creating a role for users with below authorizations.
    1.     Can display and execute the workbooks in the role menu.
    2.     Can create copy workbooks ( Save as) in the role menu.
    3.     Can not delete the original and the copy workbooks from role menu.
    We are using an authorization object S_RS_FOLD with u2018FALSEu2019 for restricting the user from deleting workbooks.
    We also need to add one more object S_USER_AGR (without u2018Deleteu2019 property) to give the authorization of creating copy workbooks in the role menu.
    Object S_RS_FOLD this is working fine without S_USER_AGR. But after adding S_USER_AGR (without delete property), user is again able to delete the workbooks.
    So how can we achieve both the functionalities where user can not delete the workbook but can create copy workbooks in the role menu.
    Thanks,
    Sachin

    Re: Adding report (query & workbook, templates) in roles
    Go through this thread.
    And in our Project we have created one role for accessing workbooks. in that end user can access the work book but saved one and user cannot resave or delete the work book.
    we have added Auth objects S_TCODE and S_GUI.
    in S_TCODE we have added RRMX and in S_GUI we have given 60(IMPORT) access to the users.
    So that they can just share the workbook. nothing else can be done.
    Try like this. Hope this would help you.

  • How to pass parameter into extract function (for XMLTYPE)

    I have a table PROBLEMXML with XMLTYPE field xml_column. In this column there are several deffinitions for the problem. There is no max amount of deffinitions and it can be no definition at all. I need to return all definitions for every problem as a string wirh definitions separated by ";".
    Query
    SELECT extract(prob.Def,'/Definitions/Definition[1]/@var') || ';'|| extract(prob.Def,'/Definitions/Definition[2]/@var')
    FROM PROBLEMXML j ,
    XMLTABLE (
    '/problem'
    PASSING j.xml_column
    COLUMNS probid VARCHAR (31) PATH '/problem/@id',
    Def XMLTYPE PATH '/problem/Definitions') prob
    where PROBLEM_ID =1;
    returns exactly what I want a;m.
    But
    declare
    my_var varchar2(2000) :=null;
    n1 number;
    n2 number;
    begin
    n1:=1;
    n2:=2;
    SELECT extract(prob.Def,'/Definitions/Definition[n1]/@var') || '|'|| extract(prob.Def,'/Definitions/Definition[n2]/@var') into my_var
    FROM ETL_PROBLEMXML_STG_T j ,
    XMLTABLE (
    '/problem'
    PASSING j.xml_column
    COLUMNS probid VARCHAR (31) PATH '/problem/@id',
    Def XMLTYPE PATH '/problem/Definitions') prob
    where PROBLEM_ID =1;
    dbms_output.put_line(my_var);
    end;
    returns NULL.
    Is there is a way to pass parameter into extract function?

    I need to return all definitions for every problem as a string wirh definitions separated by ";".In XQuery, there's the handy function "string-join" for that.
    For example :
    SQL> WITH etl_problemxml_stg_t AS (
      2   SELECT 1 problem_id,
      3  xmltype('<problem id="1">
      4   <Definitions>
      5    <Definition var="var1"></Definition>
      6    <Definition var="var2"></Definition>
      7    <Definition var="var3"></Definition>
      8   </Definitions>
      9  </problem>') xml_column
    10   FROM dual
    11  )
    12  SELECT j.problem_id,
    13         prob.probid,
    14         prob.def
    15  FROM etl_problemxml_stg_t j,
    16       XMLTable(
    17        'for $i in /problem
    18         return element r
    19         {
    20          $i/@id,
    21          element d { string-join($i/Definitions/Definition/@var, ";") }
    22         }'
    23        passing j.xml_column
    24        columns
    25         probid varchar2(30)  path '@id',
    26         def    varchar2(100) path 'd'
    27       ) prob
    28  ;
    PROBLEM_ID PROBID               DEF
             1 1                    var1;var2;var3

  • Problem using extract function (PL/SQL) with "&#34"

    Hi,
    When I use extract function (PL/SQL), it does not transform well "&#34". Insted of returning ' " ' , it returns ' &quot '.
    I know this works changing the code replacing xml.extract for SELECT extractvalue(xml,'//A/text()') into v from dual;
    But Is there another way to do this using PL/SQL? any patch, option..?
    Regards

    Had to use my website to demonstrate the code...
    As said, whatever I try here the code gets automatically converted...
    See for answer on your question: http://www.liberidu.com/blog/?p=635

  • Down payment functionality for PO with account assignment K Cost Center

    QUESTION: Is there a way to turn-on down payment functionality for cost centers?
    When a vendor down payment is posted via tcode F-47 against a PO line item with INTERNAL ORDER as the account assignment, SAP posted the following documents from the payment run (tcode F110):
    1. Accounting Document
    dr  vendor / GL= downpymt clearing / internal order = IO1234 / cost center = CC5678
         cr  bank           
    2. Controlling Document
    dr internal order IO1234
    However, when a vendor down payment is posted against a PO line item with COST CENTER as the account assignment, SAP does not post any Controlling document, just the accounting document:
    dr  vendor / GL= downpymt clrg / cost center = CC5678
            cr bank
    From my research, it appears that the down payment functionality applies to internal orders and projects only. Then settlement is run to move the values from internal order to AUC assets and/or cost centers. Perhaps I'm missing a configuration step for the cost center piece?
    Your prompt response will be much appreciated. Thanks in advance!

    system wont generate any controlling document for noted items  downpayment and normal payments.
    Because all are balance sheet accounts. Controlling documents will generated for only P&L accounts.
    Your analysis correct.

  • Help needed in extracting values from XML

    SAMPLE XML:
    - <Form1>
    - <Name>
    <Ttl>MR</Ttl>
    <Fore>ABC1</Fore>
    <Sur>XYZ2</Sur>
    </Name>
    - <Address>
    <Line>ADD_LINE_1</Line>
    <Line>ADD_LINE_2</Line>
    <PostCode>PST CDE</PostCode>
    </Address>
    <BirthDate>0001-01-01</BirthDate>
    - <Details>
    <TotalEarnings>1234567.00</TotalEarnings>
    <TotalDeduction>12345.00</TotalDeduction>
    </Details>
    </Form1>
    - <Form1>
    - <Name>
    <Ttl>MR</Ttl>
    <Fore>ABC2</Fore>
    <Sur>XYZ2</Sur>
    </Name>
    - <Address>
    <Line>ADD_LINE_3</Line>
    <Line>ADD_LINE_4</Line>
    <PostCode>PST CDE</PostCode>
    </Address>
    <BirthDate>0002-02-02</BirthDate>
    <Gender>female</Gender>
    - <Details>
    <TotalEarnings>12345.00</TotalEarnings>
    <TotalDeduction>123.00</TotalDeduction>
    </Details>
    </Form1>
    There can be any 'n' number of <Form1>'s in one XML.But I want to get only the details of the person whose TotalEarnings>1million. Details include
    Name->Ttl,Fore,Sur
    which in this case would be MR,ABC1,XYZ1
    Address->Line,Line,Postcode
    which in this case would be ADD_LINE_1,ADD_LINE_2,PST CDE
    Birthdate
    which in this case would be 0001-01-01
    Gender
    which in this case would be "null" as there is no Gender tag present
    Details->TotalEarnings,TotalDeduction
    which in this case would be 1234567.00,12345.00
    The technique I was using is,
    1. Convert to clob
    2. User dbms_instr find the location of <Form1> in a loop
    3. For every occurence of <Form1> I find <TotalEarnings> value and check if this is greater than 1 million.
    4. If true, I use dbms_instr to get the values of all the tags inside <Form1>
    5. The drawback of using dbms_instr is that it gets the value of first occurence of whatever sting we supply.In this case dbms_instr(xml,'<Gender>',position of Form1) will not return null whereas it will return "Female" from the next form. This is wrong as it doesnt belong to the person who earns more than a million.
    Can anyone suggest a way to fetch the values that only belong to the form of the person who earns more than a million?

    There can be any 'n' number of <Form1>'s in one
    XML.Not if you want the XML to be valid there can't. You would need a root element around all the <Form1>'s to make it valid.
    The technique I was using is,
    1. Convert to clob
    2. User dbms_instr find the location of <Form1> in a
    loop
    3. For every occurence of <Form1> I find
    <TotalEarnings> value and check if this is greater
    than 1 million.
    4. If true, I use dbms_instr to get the values of all
    the tags inside <Form1>
    5. The drawback of using dbms_instr is that it gets
    the value of first occurence of whatever sting we
    supply.In this case
    dbms_instr(xml,'<Gender>',position of Form1) will not
    return null whereas it will return "Female" from the
    next form. This is wrong as it doesnt belong to the
    person who earns more than a million.
    Can anyone suggest a way to fetch the values that
    only belong to the form of the person who earns more
    than a million?Why on earth are you using dbms_instr for this? Oracle has built in XML functionality for use against XMLTYPE data, such as the ExtractValue method and the use of XPATH expressions.
    I'd suggest you start reading some of the manuals regarding XML functionality in Oracle rather than trying to manually parse it all.

Maybe you are looking for

  • Sales office and sales group in STO scenario

    We need to populate the sales group and sales office in intercompany billing originating from a STO (PO>STOdelivery>IV invoice). However, the sales office and sales group is blank despite both the customer masters of both plant customer (shipto) and

  • HTML Stripping -- too much memory

    I have a program that takes data from a database and strips it of html tags. This is done over multiple tables. Some of the tables return a few thousand lines, but then others return about 65,000 lines. I open the file created and clean the needed fi

  • Import error as error number is -12018

    Hi All, While importing a project getting an error as: Import Error: com.fatwire.cs.core.realtime.DataException: com.fatwire.assetapi.common.AssetAccessException: Error met whiling saving assets [AttrTypes:1415189814137] and the error number is -1201

  • Does Logic Express export 24 bit?

    I am debating between buying Soundtrack Pro or Logic Express and wanted to know if Logic Express exports 24 bit. Thanks.

  • Dreamweaver suddenly quits, also other applications

    I upgrade from Jaguar to Tiger in an iMac 17" Flat panel. But now some applications quit suddenly (Dreamweaver, Fireworks, even Netscape). I already reinstall these programs again and the problems remains. Does anyone can give me a clue of what can I