Query using xmltype not working

I have a table rad_reports that has an xmltype column, report_txt. This query shows that I have a document in the db:
select r.report_txt.extract('/REPORT/IMPRESSION').getStringVal() from rad_reports r
where accession=12;
and it shows:
<IMPRESSION>
this is a test
</IMPRESSION>
But the following query results in "no rows selected":
select r.report_txt.getclobval()
from rad_reports r
where contains(report_txt, 'test INPATH(/REPORT/IMPRESSION)')>0;
Furthermore, this query also returns no results:
select count(*) from rad_reports r
WHERE CONTAINS(report_txt,'HASPATH(/REPORT/IMPRESSION)') > 0;
What's going wrong?

Please post the index creation script.

Similar Messages

  • Simple query on xmltype not working

    I have a table rad_reports that has an xmltype column, report_txt. This query shows that I have a document in the db:
    select r.report_txt.extract('/REPORT/IMPRESSION').getStringVal() from rad_reports r
    where accession=12;
    and it shows:
    <IMPRESSION>
    this is a test
    </IMPRESSION>
    But the following query results in "no rows selected":
    select r.report_txt.getclobval()
    from rad_reports r
    where contains(report_txt, 'test INPATH(/REPORT/IMPRESSION)')>0;
    What's going wrong?

    Wrong forum.. queries using contains should be posted in the oracle text forum..

  • Basic query using DECODE not working as expected.

    Version:11.2.0.3
    Platform: RHEL 5.8
    I am trying to use DECODE function.
    In the below example, If the search encounters the string "Enterprise" , then the decode should
    return 'Enterprise' . But it doesn't seem to work.
    I thought some hidden character was causing the issue, so, I used TRIM. But no luck.
    SQL> create table t (banner varchar2(80));
    Table created.
    SQL> insert into t values ('Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production');
    1 row created.
    SQL> commit;
    Commit complete.
    SQL> select * from t;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    SQL> select * from t where banner like '%Database%';
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    -- Trying to use decode. If the search encounters the string "Enterprise" , then return 'Enterprise'
    -- Although the string "Enterprise" is present ,  decode doesn't seem to work.
    -- I tried using trim , upper . But no luck.
    SQL> select 'EDITION', decode(banner,'%Enterprise%','Enterprise','Standard') Edition from t where banner like '%Database%';
    'EDITIO EDITION
    EDITION Standard
    SQL> select 'EDITION', decode(trim(banner), '%Enterprise%','Enterprise','Standard') Edition from t where trim(banner) like '%Database%';
    'EDITIO EDITION
    EDITION Standard
    SQL> select 'EDITION', decode(upper(trim(banner)), '%ENTERPRISE%','Enterprise','Standard') Edition from t where upper(trim(banner)) like '%DATABASE%';
    'EDITIO EDITION
    EDITION Standard
    SQL>
    Just don't understand why decode can't see the string "Enterprise"
    BTW . Where is the preview button ?

    It (a portion string matching) ain't work in DECODE, for this CASE has a advantage of using over it.
    Like
    with t
    as
    (select 'Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production' banner from dual)
    select 'EDITION',
    case when banner like '%Enterprise%' then 'Enterprise' else 'Standard' end edition
    from t
    'EDITIO EDITION
    EDITION Enterprise

  • Change password on the first use - does not work

    Change password on the first use - does not work.
    Created a user and specified 'Change password on the first use' - when user logs in - the 'Change password' window does not pop- up.
    Please advise.

    (APEX 4.0.2) I am running into this same issue - if you don't set the password expiration and locking to 'Yes', the user gets into the app without being asked to change the pw.
    When you do set expiration and locking - after the user logs on with their temporary password, it does take them to the change password page (4155:50) but the username is blank. Because the username didn't get to the page the old password will never match and you get the "Invalid password" message.
    What am I missing? Anyone successful doing this?
    Simple application, default authentication, no javascript, HTTP_SERVER, no ssl.
    Thanks,
    Steve

  • Query level filter not working in Webi report

    Hi All,
    I am using BOXI R3.1 (SP3), m facing one problem when refreshing Webi report on daily basis. I am using three query level filter as a prompt, but i checked one filter is not working then i need to reapply this filter and rest 2 filter is working fine.
    Can anyone suggest me why problem is coming?
    Regards,

    Hi,
    Prompts are interactive, and come from the query panel. Filters are not interactive, and are set on the report or block. There are also input controls, which are interactive filters
    1. Select the universe in the list of universes to open the Query Panel.
    2. Drag the Year object to the Result Objects pane.
    3. Drag the Number of Guests object to the Query Filters pane and create a report filter that restricts Number of Guests to greater than n.
    4. Click Combined Query.
    The Combined Query pane appears in the bottom left of the Query panel with the two queries joined by UNION.
    5. Click on the second query and remove the Year and Number of Guests objects.
    6. Drag the Reservation Year object to the Result Objects pane.
    7. Drag the Future Guests object to the Query Filters pane and create a report filter that restricts the future guests to greater than n.
    8. Click Run Query.
    Best Regards
    Naveen

  • Query remote table not working in PL/SQL

    I have a problem that is killing me to figure out. Basically we trying to query a remote table through PL/SQL and it comes back with invalid column name for the table. But the table exists in the remote database and has the column. The query works fine from the same database outside of PL/SQL, just not in PL/SQL. I'll setup a test case below.
    We have local database called DB1 and remote database called DB2. The table we are querying is called EMP.
    First we create database link:
    create database link DB2.WORLD connect to...
    Test the link:
    select ENAME from [email protected];
    ENAME
    SHAWN
    Works fine.
    Now we put this query inside a PL/SQL block:
    declare
    l_ename varchar2(20);
    begin
    select ename into l_ename from [email protected];
    end;
    This fails with the following error:
    select ename
    ERROR at line 274:
    ORA-06550: line 274, column 7:
    PL/SQL: ORA-00904: invalid column name
    ORA-06550: line 271, column 3:
    PL/SQL: SQL Statement ignored
    ORA-06550: line 279, column 9:
    PL/SQL: ORA-00904: invalid column name
    ORA-06550: line 277, column 3:
    PL/SQL: SQL Statement ignored
    Now, I've tried changing how we select from the remote table, I've put the select statement in a cursor, tried creating a synonym which points to the remote table and selecting using the synonym in PL/SQL, it always returns the same error. But always works outside of PL/SQL.
    Now the user we are connecting to the remote database as, has select on the EMP table, through a role, along with 30 other tables, all the other tables are able to be selected through the database link, in PL/SQL, it's just this one table.
    Additionally I can go to another database, and create the same database link, and the query in PL/SQL works fine to the remote table. It's just this one table, from this one database, that doesn't work just in PL/SQL. Any ideas would be appreciated, I've exhausted everything.
    Also, creating a copy of the table using "create table as select * from..." we can select from the copy of the table using PL/SQL through the database link. The problem is this is a central warehouse table, and is used my multiple applications and updated constantly, so dropping a recreating this table is a last resort.
    Yes, this process did work, for over a year, then suddenly it stopped. Of course, no one made any changes to either database, that's always the case. I know the code didn't change though, it was still timestamped from a year ago.
    Thanks in advance.

    Could this be a variant on an old favourite, viz privileges being granted through roles. We cannot use objects in PL/SQL if our privileges are assigned through a role.
    Maybe what has changed is that instead of being granted privileges on EMP@DB2 directly the privileges have been re-organised so that your user has them granted through a role.
    Cheers, APC

  • Total using SUM not working on Account field on Lead History report

    Hi,
    I have a report based on Lead History on which I need to use the SUM of a field that is under the Account.Custom Number/Integer. This basically is a report of leads along with some fields from the account the lead is associated with. The SUM on that field works fine when I try it on another report off the Account History object but does not work when used on the report off the Lead History. It just shows the value of the field for that record instead of the total of the field for all the records displayed on the report. I am guessing that the issue has to do with the query going off the Lead-Account relationship because of which it treats each relationship as one resultset and totals the field values for just that relationship.
    Any ideas on how to accomplish this would help very much. Can a field on one report be referred from another to achieve this?
    Thanks in advance for your help!
    Regards,
    Madhukar

    Hi again
    Just checked a similar report test I did a while ago, and my query is:
    SELECT c001 MyText, TO_NUMBER(c002) MyNumber
    FROM HTMLDB_COLLECTIONS
    WHERE COLLECTION_NAME = 'ATD'
    So, you should use TO_NUMBER(c002)
    Andy

  • Passing Mutivalue Constant Query Filter is not working

    Hi All,
    I am using Webi4.0.On the Query panel when I try to pass multiple values to a constant filter it does not work.For example if I try to apply State filter in my Query and if I select Constant as its type and type A,B then Webi takes only A in the query and not B.
    I know it a simple task but however it is not working.
    Any help on this will be appreciated.
    Thanks in advance.

    Hi Riddhi,
    Can you pls put scrrenshot how you are passing multiple value to filter.
    ~Anuj

  • KF level Authorization using 0TCAKYFNM not working

    Hi,
    I need to restrict users from seeing a particular KF say cost in 0sd_c03 cube. I have done the following:
    1. In RSECADMIN I created authorization ZCOST
    2. I added 0TCAACTVT
    0TCAIPROV
    0TCAKYFNM
    0TCAVALID
    3. For 0TCAIPROV I gave value as 'Include' 'EQ' 0SD_C03
    4. For 0TCAKYFNM I gave value as'Include' 'EQ' 0COST_VAL_S
    5.Then I went to a ZROLE and included the ZCOST created in step 1 above to S_RS_AUTH and assigned a few users with this ZROLE.
    6. I created a query using 0COST_VAL_S in the 0SD_C03 cube
    7. When I run the test in RSECADMIN for users with ZROLE and without ZROLE I get the cost showing up in the query. My expectation is users with ZROLE shouldnt have access to cost.
    Are these steps the right ones to follow and what am I missing for the authorization to work. Pls help ASAP.
    Thanks
    Suja

    Hi,
    I was able to use a copy of 0BI_ALL and provide authorization only to those KF's that users can see in that cube. Whatever was not in the list of restrictions of the 0TCAKYFNM the user didnt have access. Thanks a lot for all your help and suggestion.
    If I create a new Z object, the report didnt show anything - just gave the message ' no authorization'. If I run SU53 it said 0BI_ALL was missing. So I followed the steps mentioned above.
    Thanks
    Suja

  • XMII Query Selected tags not working

    I am using a query template for tag list against a UDS PI server and the "Selected Tags" dos not seem to wok. It retuns all tags or masked ones even when the check box "Use Group.Mask .....'  is unchecked.
    The UDS does not have groups since the alias tool  doesn't seem to allow wildcarding accomadating future tags.
    Product Version: 11.5.3 b66
    Thanks, Ed (for Shari)

    Hi,
    As Jeremy said, 'Use Group or Mask for Tag selection' is used for Current, History, HistoryEvent, and Statistics query modes. For namespace query modes such as TagList/GroupList it will not work. Please find the below link for you help:
    http://help.sap.com/saphelp_xmii115/helpdata/en/index.htm
    Hope it helps!
    Best Regards,
    Kedar

  • XMLTYPE not working on SQL Dev 4 EA3

    Hi,
    It appears that XMLTYPE is still not working correctly in SQL Developer EA4 Version 4.0.0.13 Build MAIN-13.30.
    The following produces an XMLTYPE result, but it is not viewable:
    SELECT
      XMLELEMENT("root",
        XMLAGG(
          XMLELEMENT("elem", 123)
    ) "XML"
    FROM dual;
    This works correctly in SQL Developer 3.
    Note that doing a .getClobVal() on that result does give the text string of the XML, so it is a view problem in EA3 that doesnt show the raw  XMLTYPE.
    Thanks,
    Steve

    yeah, it's a DB bug (16881111), which is addressed in 11.2.0.4
    As a workaround you can execute this as as script (F5), or use getclobval() in your statement

  • IPad connected to TV using dim not working with iOS 7.0.2

    Since updating my iPad to iOS 7.0.2, connecting my iPad 4 using hdmi to my tv is not working.
    In fact, when connected, everything on my iPad is in slow motion. The iPad moves in slow motion. And there is no image being mirrored on the tv. This use to work fine before the update. Any ideas?

    (A) Reset iPad
    Hold down the Sleep/Wake button and the Home button at the same time for at least ten seconds, until the Apple logo appears
    Note: Data will not be affected.
    (B) Reset all settings
    Settings>General>Reset>Reset all settings
    Note: Data will not be affected but settings will be reset.

  • Report using charts not work on non-development machine

    Post Author: ftsoft
    CA Forum: .NET
    using visual studio report uses charts.  works fine on development machine when I move the web app to a test machine which does NOT contain visual studio, the chart report does not worknote: other reports which only display data records work fine. the space where the charts should be displayed contain the following two lines CrystalReportViewer - CrystalReportViewer1 Error: Fail to render the page.  any help would be appreciated

    Solution suggested worked for me. 
    On my test server Crystal was trying to use the c:\temp directory to write the temporary images, my report always ran ok on the test server.  On the live server CRW was running under with the ASPNET account and / or my own user account. 
    I ran FileMon and filtered on the aspnet_wp.exe process across both servers and ran the application up to the point of generating the issue.  The FileMon output from the test server showed no issues we as the output from FileMon off the live server showed an access denied message.
    I gave access right to the relevant accounts on the relevant folders on the live server and the report ran fine.

  • Resizing image using CSS - not working in IE

    Hello,
    I have a standard report with couple of columns one of which a image column. The images are of varying sizes and I manged to resize them to a fixed width & height by using CSS code in page header as below:
    td[headers="ITEM_PICTURE"] img {
      display: block;
      width: 70px;
      border: 1px solid #999;
      padding: 4px;
      background: #f6f6f6;
    }The CSS does the trick in Chrome & Firefox but does not work in internet explorer. Is there a way to make this CSS code IE friendly?
    Cheers for help.

    William Wallace wrote:
    I am using Apex 4.2.1 (had this issue in 4.1.1 as well) and using theme 10.Ah, the Sludge Sand theme. In 4.x that's a legacy theme only really included to allow applications to run on IE6. It's therefore intended to run in quirks mode, meaning in Internet Explorer terms there's no support for anything that didn't work in IE6 (for certain values of "work"). This means no CSS3, no support for a lot of useful CSS2.1 stuff (like attribute selectors), and probably problems with jQuery which requires standards mode. Adding a DOCTYPE to the page templates to trigger standards mode Interactive Report: how can I display carriage returns?. In 4.2 you really should switch to one of the latest Standard themes, or at least one of the standards mode Legacy themes (those not marked with a "*").
    If you must use theme 10, and there are no other images in this report (like edit icons) then you could add a static ID to the region and use a more basic selector like:
    #static-id td.t10data img {
      display: block;
      width: 70px;
      border: 1px solid #999;
      padding: 4px;
      background: #f6f6f6;
    }However, it appears that one of IE's quirkier quirks mode quirks is that CSS padding is not supported on images, so the presentation you want is not possible using theme 10 in IE and CSS alone.
    Switching to a modern theme is recommended.
    Edited by: fac586 on 02-Mar-2013 10:31

  • Dynamic resizing in JDialog using setSize not working properly on solaris

    can anyone help..
    Dynamic resizing in JDialog using setSize is not working properly on solaris, its work fine on windows.
    i have set Jdialog size to setSize(768,364),
    when i dynamically resizing it to setSize(768,575); it doesn't get change but when i move dialog using mouse it gets refreshed.
    this problem is only happening on solaris not on windows.

    Hi,
    It's only an approach but try a call of validate() or repaint() after re-setting the size of your dialog.
    Cheers, Mathias

Maybe you are looking for

  • Cursor printing on xy graph

    I am using Labview version 6.1 in Windows 2000. I have an XY graph that has active cursors used to select an interval of data for analysis from a raw data set. I pass the necessary parameters of this graph including scale settings, labels, the data s

  • Forum for Oracle CGBU

    Hi, I'm working with Oracle CGBU, How can we create a new category and a forum for discussions related to CGBU? Thanks, Sachidanand ([email protected]) Bangalore,India

  • Oracle 9i database CLONE

    Hi all, Can any one tell me how to clone oracle 9i database. I am new in DBA post plz help me. Or plz give me any document ID in metalink.

  • Launch PB in CS5 and get "The operation could not be completed."

    I had been using the PB plug-in previously and it worked fine.  Since that time, I have installed no new hardware or drivers but have installed Topaz Adjust 4 filter.  Now, when I have an image opened in PS CS5 and I click Filters -> Pixel Bender ->

  • Changing the dbid of the physical standby database...

    hai... i am new to dataguard. can we change the dbid of the physical standby database? and if it is possible what would be the effect on primary database at the time of sending archive log files. why should we change the dbid of the logical standby d