Searching (CONTAINS) on OrdDoc columns...

I have a table containing an ordDoc column, among others:
CREATE TABLE MY_DOCS (number ID, ordsys.orddoc DOC_BODY);
The OrdDocs are a mix of PDF and Word, majority being Word.
I have successfully managed to create a Context index on the document column:
CREATE INDEX MY_INDEX ON MY_DOCS(DOC_BODY.source.localdata)
INDEXTYPE IS CTXSYS.CONTEXT;
There are no errors in ctxsys.ctx_index_errors, and I have loaded up some documents and done a Synch:
ctx_ddl.sync_index('MY_INDEX', '2M');
But when I try a CONTAINS query -
SELECT score (1), id FROM MY_DOCS WHERE CONTAINS(doc_body, 'forensic', 1) > 0;
I get the following errors:
ORA-29900: operator binding does not exist
ORA-06553: PLS-306: wrong number or types of arguments in call to 'CONTAINS'
I have also tried
SELECT score (1), id FROM MY_DOCS WHERE CONTAINS(DOC_BODY.SOURCE.LOCALDATA, 'forensic', 1) > 0;
with the result
ORA-00904: "DOC_BODY"."SOURCE"."LOCALDATA": invalid identifier
SO the question then is... how DO I do a CONTAINS query against the ORDDOC Column?
thanks
Brigette

Thanks Lawrence,
I found it also works with a column alias, and you need to add the .source.localdata
ie:
SELECT score (1), id FROM MY_DOCS d WHERE CONTAINS(d.doc_body.source.localdata, 'forensic', 1) > 0;
Brigette

Similar Messages

  • Text search query into long column

    hi,
    I need some explanation about this situation:
    I need to perform a search into a long column containing XML file. Not all records found match my search criteria.
    If I search in a varchar column it seem to be correct, so have you any suggest for me?
    thanks in advance,
    Virginio
    null

    I'm working with Oracle8i version 8.1.7
    realese 3.
    This is an example of query that I'm using:
    select *
    from <table>
    where contains (<column>, <string>, 0) > 0
    where <column> is of type Long and <string>
    is the text to search. At the moment I don't need to apply any score filter.
    I've generated the index on this table as suggested by documentation:
    create index <index_name> on <table>(<column>) indextype is ctxsys.context;
    Thanks in advanced,
    Virginio.
    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by Omar Alonso ([email protected]):
    Could you please post the test case? What's the db version and platform?<HR></BLOCKQUOTE>
    null

  • Web dynpro for abap how to create a customize search help in alv column

       hi:
          Web dynpro for abap how to create a customize search help in alv column and put search help value into alv column?
          Are there specific examples ?
          thanks!!

    HI:
       I want to created a freely programed help which include date&time,and put help value to alv column.
      I have created a freely programed help in web dynpro for abpa application,I refer:
      **************** - WebDynpro for ABAP
      but have a problem!
       If you focus on the the input field in the first row, you get the value help
    However if  I go to the second row and focus on the same input field in this column, I don't get the value help:
    What is a good way to solve similar problems?
    thanks

  • "Item Containing Primary Key Column Value" does not display records

    Hello,
    We are developing a new page where an "Automated Row Fetch" process is needed.
    With other pages we experienced no issues. But with a new one, when defining the value for the field “Item Containing Primary Key Column Value”, Apex displays no rows.
    As far as we know, Apex should display all the fields defined for the page. Is there any property which affects the fields visibility?
    The affected page has textarea and text fields.
    Thanks in advance.

    Hello,
    Sorry, we have already detected that the problem was at field definition.
    Fields should be defined as "Source Type: Database Column". They were wrong defined.
    Thanks.

  • Selected named searches contains invalid search selections Data Manager

    Hello Experts,
    There is error in Named search in MDM Data Manager.
    Error message:
    one or more selected named searches contains invalid search selections that have been removed
    for the current search. To correct this problem, restore each named search, modify it as
    necessary and then save it to named search. Version 7.1.05.104
    After restore each named search, still error remain there.
    Thanks in advance.

    Hello,
    Can you please share your solution to this issue.
    I am having similar problems and would be interested to know how you solved it.
    Thanks in advance,
    Sofiane

  • Contains clause in Interactive report search of a clob column

    Hi,
    I am using APEX Version 4.2.4.00.08
    How can an interactive Report use the contains clause when searching a clob column so that it uses the CONTEXT index?
    Thanks
    Chandra.

    I wrote it into the SQL used for the IR
    I created an APEX application that stores all of our IT's HOWTO documents. (word,excel,pdf)
    ctx_doc.snippet creates HTML code.
    select D.doc_id
      ,D.doc_filename
      ,dbms_lob.getLength( D.doc_blob ) as download
      ,decode( :P12_SEARCH, null, '-- nothing --',
             ctx_doc.snippet( 'IT_DATA.DOC_CTX_IX' -- my Oracle Text index name
                                 , D.doc_id, :P12_SEARCH )
       as snippet
    from it_data.documents D
    where :P12_SEARCH is null
    or contains( D.doc_blob, :P12_SEARCH ) > 0
    MK

  • Search text in Long column

    Hi All,
    I want to search those views whose text contains a word 'PATIENT'. I queried DBA_VIEWS, but the text column is of Long datatype, so it is not accepting the following query:
    select owner, view_name, text from dba_views where text like '%PATIENT%';
    Is there any other way out to get such data??
    Thanks,
    Api

    But what about the mviews?? It doesn't work with dbms_metadata.get_ddl..Why not?:
    SQL> create materialized view mv_emp
    refresh complete on demand
    as
    select * from emp
    Creatematerializedview successfully completed.
    SQL> select dbms_metadata.get_ddl('MATERIALIZED_VIEW', 'MV_EMP', user) from dual
    DBMS_METADATA.GET_DDL('MATERIALIZED_VIEW','MV_EMP',USER)                       
      CREATE MATERIALIZED VIEW "MICHAEL"."MV_EMP" ("EMPNO", "ENAME", "JOB", "MGR", "
    HIREDATE", "SAL", "COMM", "DEPTNO")                                            
      ORGANIZATION HEAP PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOG
    GING                                                                           
      STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645        
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)             
      TABLESPACE "USERS"                                                           
      BUILD IMMEDIATE                                                              
      USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255                               
      STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645        
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)             
      TABLESPACE "USERS"                                                           
      REFRESH COMPLETE ON DEMAND                                                   
      WITH PRIMARY KEY USING DEFAULT LOCAL ROLLBACK SEGMENT                        
      USING ENFORCED CONSTRAINTS DISABLE QUERY REWRITE                             
      AS SELECT "EMP"."EMPNO" "EMPNO","EMP"."ENAME" "ENAME","EMP"."JOB" "JOB","EMP".
    "MGR" "MGR","EMP"."HIREDATE" "HIREDATE","EMP"."SAL" "SAL","EMP"."COMM" "COMM","E
    MP"."DEPTNO" "DEPTNO" FROM "MICHAEL"."EMP" "EMP"                               
    1 row selected.

  • How to sort a Search (in Finder) by Column?

    In Snow Leopard, you could sort the results of a Finder search by column (for example, "Date Created" or "Kind").  That appears to no longer be available in Lion. Am I missing something?
    Also, the Search box in Finder allowed you to filter your search by File Name. This was handy, for example, if you were searching for a file that ended in .PSD and you were not just looking for a file that contained the text string "PSD" in it.  This seems to have been removed in Lion.  Is there a workaround?

    See your other post.

  • How to define ctxsys.context index for an ORDDoc column

    I need to use Oracle Text to search on a column that is of type ORDsys.OrdDoc. Can someone point me in the direction of an example please - I note someone pointed out that a USER_DATASTORE is the way to go, but what do I need to put it it? I also wish to use Word to HTML feature of the INSO_FILTER if at all possible.
    thanks
    Brigette

    Hi Brian,
    I don't know how to do this with a SQL query (as the OrdDoc may not be displayable say in SQLPlus), but if you check out the samples at http://otn.oracle.com/sample_code/products/intermedia/htdocs/intermedia_servlet_jsp_samples/imedia_servlet_jsp_readme.htm
    there is a JAva Servlet that works nicely. If you are not a Java person, there are other samples at http://otn.oracle.com/sample_code/products/intermedia/index.html
    keep smiling
    Brigette

  • SQL REPORT BUT SEARCH PROBLEM ON CREATED_ON Column

    Hi Friend,
    i have create SQL Report .
    My Code
    select      CRM_SALES_DEALs.id,
                        "CRM_SALES_CUSTOMERS"."CUSTOMER_NAME" as "CUSTOMER_NAME",
          "CRM_SALES_SALESREPS"."REP_LAST_NAME"||', '||
          "CRM_SALES_SALESREPS"."REP_FIRST_NAME" as "REP_NAME",
           "CRM_SALES_DEALS"."DEAL_CLOSE_DATE" as "DEAL_CLOSE_DATE",
           "CRM_SALES_DEALS"."DEAL_PROBABILITY" as "DEAL_PROBABILITY",
          "CRM_SALES_DEAL_STATUS_CODES"."STATUS_CODE" as "STATUS_CODE" ,
             "CRM_SALES_DEALS"."DEAL_AMOUNT" *
             "CRM_SALES_DEALS"."DEAL_PROBABILITY" / 100 weighted_forecast,
    (select count(*) from CRM_SALES_DEAL_notes where deal_id = "CRM_SALES_DEALS".id) notes,
    (select count(*) from CRM_SALES_DEAL_products where deal_id = "CRM_SALES_DEALS".id) products,
    nvl("CRM_SALES_DEALS".updated_on,"CRM_SALES_DEALS".created_on) last_changed,
    t.territory_name,
    CRM_SALES_DEALS.qtr, "CRM_SALES_DEALS"."CONTACT_NAME" as "CONTACT_NAME"
    from     
    "CRM_SALES_SALESREPS",
    "CRM_SALES_DEAL_STATUS_CODES" ,
    "CRM_SALES_CUSTOMERS",
    "CRM_SALES_DEALS",
    CRM_SALES_territories t
    where  
    CRM_SALES_customers.customer_territory_id = t.id(+) and
    "CRM_SALES_DEALS"."CUSTOMER_ID"="CRM_SALES_CUSTOMERS"."ID"(+)
    and      "CRM_SALES_DEALS"."DEAL_STATUS_CODE_ID"="CRM_SALES_DEAL_STATUS_CODES"."ID"(+)
    and      "CRM_SALES_DEALS"."SALESREP_ID_01"="CRM_SALES_SALESREPS"."ID"(+)
    and (:p1_find is null or instr(upper("CRM_SALES_CUSTOMERS"."CUSTOMER_NAME"),upper(:p1_find))>0 or instr(upper("CRM_SALES_DEALS"."DEAL_NAME"),upper(:p1_find))>0 or
    instr(upper("CRM_SALES_SALESREPS"."REP_FIRST_NAME"||' '||"CRM_SALES_SALESREPS"."REP_LAST_NAME"),upper(:p1_find))>0)
    and
    (nvl(:P1_TERRITORY,0) = 0 or t.id= :P1_TERRITORY)
    and
    (nvl(:P1_ACCOUNT,0) = 0 or "CRM_SALES_CUSTOMERS".id = :P1_ACCOUNT)
    and
    (nvl(:P1_QUARTER,'0') = '0' or CRM_SALES_deals.qtr = :P1_QUARTER)
    and
    nvl(DEAL_PROBABILITY,10) between nvl(:P1_MINIMUM_PROBABILITY,0) and nvl(:P1_MAXIMUM_PROBABILITY,100) or
    instr(upper("CREATED_ON"),upper(nvl(:P1_CREATE_DATE,"CREATED_ON")))My TAble
    CREATE TABLE  "CRM_SALES_DEALS"
       (     "ID" NUMBER,
         "CUSTOMER_ID" NUMBER NOT NULL ENABLE,
         "DEAL_NAME" VARCHAR2(255),
         "DEAL_CLOSE_DATE" DATE NOT NULL ENABLE,
         "DEAL_CLOSE_DATE_ALT" DATE,
         "DEAL_STATUS_CODE_ID" NUMBER,
         "DEAL_CUSTOMER_LOCATION" VARCHAR2(4000),
         "CREATED_BY" VARCHAR2(255),
         "CREATED_ON" DATE,
         "UPDATED_BY" VARCHAR2(255),
         "UPDATED_ON" DATE,
         "QTR" VARCHAR2(8),
         "DEPARTURE_DATE" DATE,
         "DEAL_SOURCE" VARCHAR2(15),
         "ADDRESS1" VARCHAR2(255),
          PRIMARY KEY ("ID") ENABLE
    /i want to search with CREATE_ON Column.
    How can i create code for search in my Quary Code.
    My Item is :P1_CREATE_DATE
    I have try it in last Line in code but it's show me Error.Invalid Relational Operator .
    How can i slove and serch with Created_on Column.
    Thanks
    Edited by: 805629 on Dec 27, 2010 9:13 PM
    Edited by: 805629 on Dec 27, 2010 9:13 PM

    Hi Friends,
    i have sortout this problem.
    Thanks

  • How to enable the search option for a column in an old report

    Hi ,
    I created the report. It works fine. I remember while creating the report, at one step, I was asked to sort, search column level (check option) . I skipped that option at that time. But now I want to check/ enable them . So, how and where to do that ?
    Thanks.

    Hi,
    I think easiest way is re-create your report , so wizard do things for you.
    Other vise you need create "search bar" region and items manually and edit report where clause.
    You can first set your old report condition to never and create new report with same select.
    When you are sure that new report working ok, you delete old report.
    Br, Jari

  • String Search Query in any columns in any table in a database

    Hi All,
    I am trying to search a word which starts with 'FRA' in any columns and any tables.
    I am unable tofind what is generating a join datasets in the webservice from teh database as it is not apparent within teh 100 tables.
    I ahve looked into
    Re: How to search in all rows and all columns?
    Re: SQL Search Query - HELP!
    but none of these queries is working out for me as I am a user with no tables on its own but rather a user quering other tables.I think its a tweak on which dat adisctionary I can view
    select distinct substr (table_name, 1, 14) "Table",
    substr (t.column_value.getstringval (), 1, 50) "Column/Value"
    from all_cons_columns,
    table
    (xmlsequence
    (dbms_xmlgen.getxmltype ('select ' || column_name
    || ' from ' || table_name
    || ' where upper('
    || column_name
    || ') like upper(''%' || 'fra'
    || '%'')'
    ).extract ('ROWSET/ROW/*')
    ) t
    order by "Table";
    running teh above query got me thsi error:
    ORA-19202: Error occurred in XML processing
    ORA-00942: table or view does not exist
    ORA-06512: at "SYS.DBMS_XMLGEN", line 288
    ORA-06512: at line 1
    19202. 00000 - "Error occurred in XML processing%s"
    *Cause:    An error occurred when processing the XML function
    *Action:   Check the given error message and fix the appropriate problem
    Any help is much appreciated
    Edited by: CrackerJack on Sep 3, 2012 5:55 PM
    Edited by: CrackerJack on Sep 3, 2012 5:55 PM

    Hi,
    CrackerJack wrote:
    Hi All,
    I am trying to search a word which starts with 'FRA' in any columns and any tables.
    I am unable tofind what is generating a join datasets in the webservice from teh database as it is not apparent within teh 100 tables.
    I ahve looked into
    Re: How to search in all rows and all columns?
    Re: SQL Search Query - HELP!
    but none of these queries is working out for me as I am a user with no tables on its own but rather a user quering other tables.I think its a tweak on which dat adisctionary I can view In all_<b>cons</b>_columns, "cons" stands for "constraints". That view only includes columns that have a constraint on them. 
    Use all_<b>tab</b>_columns if you're interested in all columns in all tables.
    select distinct substr (table_name, 1, 14) "Table",
    substr (t.column_value.getstringval (), 1, 50) "Column/Value"
    from all_cons_columns,
    table
    (xmlsequence
    (dbms_xmlgen.getxmltype ('select ' || column_name
    || ' from ' || table_name
    || ' where upper('
    || column_name
    || ') like upper(''%' || 'fra'
    || '%'')'
    ).extract ('ROWSET/ROW/*')
    ) t
    order by "Table";You may have noticed that this site noramlly compresses whitespace.
    Whenever you post formatted text (such as query results) on this site, type these 6 characters:
    \(small letters only, inside curly brackets) before and after each section of formatted text, to preserve spacing.
    When referencing a table in a differenct schema, you must qualify the table name with the owner (unless there happens to be a synonym).  For example, if you are connected as some user other than scott, and you want to use the emp table that is in the scott schema; then you can't just say "SELECT ... FROM emp;", because that would look for the emp table in yur own schema.  You have to say "SELECT ... FROM <b>scott.</b>emp;" instead.  If the table is in your own schema, then the scema name is optional.  The OWNER column in all_tab_columns gives the schema name.
    running teh above query got me thsi error:
    ORA-19202: Error occurred in XML processing
    ORA-00942: table or view does not exist
    ORA-06512: at "SYS.DBMS_XMLGEN", line 288
    ORA-06512: at line 1
    19202. 00000 - "Error occurred in XML processing%s"
    *Cause:    An error occurred when processing the XML function
    *Action:   Check the given error message and fix the appropriate problemSorry, I don't know what causes that error.
    If I use the data dictionary view cols (as in {message:id=3325696} which you cited), it runs correctly.
    If use what I though was the equivalent data dictionary view, user_tab_columns, or if I use all_tab_columns or other data dictionary views, then I get those errors.  I'm using Oracle 10.2.0.1.0.
    Edited by: Frank Kulash on Sep 3, 2012 10:45 PM
    John Spencer noticed the same problem 5 years ago.  See {message:id=1969268}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Position search WebDynpro - position id column blank

    Hello experts,
    On one of my HCM adobe forms, I have a position search button which calls a standard WebDynpro for position search. WebDynpro is using the org view group MSS_POS_SEARCH3 from OADP. When I search for positions using wildcards etc., I am getting the right list but position id column is always blank. When I select a position row, right position id is being passed onto the form. It's just not displaying the position id on the popup even though it has a value. Any thoughts please.

    Hi,
    In CN43N output, press 'Change Layout' button and include Position ID in you layout. Its available in standard report, no development or notes reqd.
    Regards
    Shrikant

  • Data contained in Logical Column w.r.t mapped columns

    Hi,
    A logical column (say A) of BMM layer is mapped to two different columns of separate tables (T1 and T2).
    What data will the column A (of BMM layer) contain (data corresponding to column of table T1 or T2) ?
    Regards

    Just bind the data in your data model, then display the table as usual. Here is an example.

  • Search last 4 of column values

    Is there a way to create a select statement that will do something like:
    my_number
    1234561111
    1234561112
    2234561111
    4234561111
    SELECT * FROM TABLE WHERE my_number = (LAST 4) 1111
    return 3 rows.
    I need to search for the last 4 digits of that column. I don't want to do a LIKE because it has to be the LAST 4 and nothing in-between.

    where substr(n,length(n)-3,length(n)) A marginally easier way to do this is with a negative length specifier which means last n characters:
    SQL> with t as (select 1234561111 as n from dual union all
      2             select 1234561112 as n from dual union all
      3             select 2234561111 as n from dual union all
      4             select 4234561111 as n from dual)
      5  select n, substr(n, -4) last_4
      6  from   t
      7  ;
                       N LAST
              1234561111 1111
              1234561112 1112
              2234561111 1111
              4234561111 1111

Maybe you are looking for