Oracle text help from gurus

Hi,
The sql below runs fast in 10gR2 using domain index, but when I uncomment the two commented lines, it reverts back to full table scan and takes longer. Can anyone explain why?
select
pharmacy_name
FROM pharmacy_test
WHERE 1=1
and
(:v_search_pharmacy_name is not null and
contains (pharmacy_name, '%' || :v_search_pharmacy_name || '%') > 0
--            or
--            :v_search_pharmacy_name is null )
Thanks,
JGP

Here's the plan for the original sql:
SELECT STATEMENT  ALL_ROWSCost: 11,811  Bytes: 142,940  Cardinality: 4,084       
*     1 TABLE ACCESS FULL TABLE REPORTUSER.PHARMACY_TEST Cost: 11,811 Bytes: 142,940 Cardinality: 4,084*
And here's the one with the null check:
SELECT STATEMENT  ALL_ROWSCost: 14  Bytes: 1,435  Cardinality: 41                 
*     3 FILTER           *
*          2 TABLE ACCESS BY INDEX ROWID TABLE REPORTUSER.PHARMACY_TEST Cost: 14 Bytes: 1,435 Cardinality: 41      *
*               1 DOMAIN INDEX INDEX (DOMAIN) REPORTUSER.PHARMACY_TEST_IX1 Cost: 4*
Thanks,
JGP
Edited by: user567088 on Oct 28, 2009 10:47 AM

Similar Messages

  • Oracle Text Help

    Hello Gurus,
    I am new to Oracle Text so i need your valuable inputs in resolving an issue i am facing.
    Here is the table definition and sample data:
    create table test ( a varchar2(100));
    insert into test values('Hello How are you');
    insert into test values('Just to say you Hello');
    insert into test values('I know you');
    insert into test values('you know');
    insert into test values('you may not know me');
    insert into test values('do i know you');
    SQL> SELECT * FROM test;
    A
    Hello How are you
    Just to say you Hello
    I know you
    you know
    you may not know me
    do i know you
    6 rows selected.
    If user enters search criteria ('you know', for example); i need to return all the records having 'you' AND 'know' anywhere. Hence for search criteria 'you know', i should get following records:
    I know you
    you know
    you may not know me
    do i know you
    Similarly, i need to return below records for criteria 'hello you':
    Hello How are you
    Just to say you Hello
    Can Oracle Text help me here?
    Thanks in advance for your help.
    regards,

    SQL>  create table test ( a varchar2(100))
    Table created.
    SQL>  insert into test values('Hello How are you')
    1 row created.
    SQL>  insert into test values('Just to say you Hello')
    1 row created.
    SQL>  insert into test values('I know you')
    1 row created.
    SQL>  insert into test values('you know')
    1 row created.
    SQL>  insert into test values('you may not know me')
    1 row created.
    SQL>  insert into test values('do i know you')
    1 row created.
    SQL>  create index test_idx on test (a) indextype is ctxsys.context
    Index created.
    SQL>  var str varchar2(100)
    SQL>  exec :str := 'you know'
    PL/SQL procedure successfully completed.
    SQL>  select * from test where contains(a,:str) > 0
    A                                                                              
    I know you                                                                     
    you know                                                                       
    you may not know me                                                            
    do i know you                                                                  
    4 rows selected.
    SQL>  exec :str := 'hello you'
    PL/SQL procedure successfully completed.
    SQL>  select * from test where contains(a,:str) > 0
    A                                                                              
    Hello How are you                                                              
    Just to say you Hello                                                          
    2 rows selected.

  • Oracle Text  - Help needed

    Hi,
    I am using Oracle Text 9.2 on Oracle databas version 9.2. I want to search for two words, which should be next to each other. For ex.
    select col1, col2
    from tab1
    where contains (col2, 'personal computer') > 0;
    I don't want those rows, which have personal in one place and computer in another place. But above query giving all these rows. Please let me know.
    Thanks a lot for the help.

    I want to search for two words, which should be next to each otherhere we go:
    SQL> create table t as select 'my personal computer' col1 from dual union all
                      select 'personal' col1 from dual union all
                      select 'computer' col1 from dual union all
                      select 'personal pc computer' col1 from dual
    Table created.
    SQL> create index t_idx on t (col1) indextype is ctxsys.context
    Index created.
    SQL> select * from t where contains(col1, '{personal computer}') > 0
    COL1               
    my personal computer
    1 row selected.

  • Oracle Text Help with XML column values

    Hello. In addition to being new to Oracle Text, I am inheriting an Oracle Text application and have a couple of questions.
    First, A context-based index has been set-up on a CLOB column which contains an XML formatted document. The Auto Section Group parameter has been set to created zones for each tag of the XML document. I have found that when using a browser to display the content of the CLOB, some of the column values have trouble displaying in the browser, where I receive an XML processing error. I believe this is due to the fact that some of the XML document rows contain URLs that are not embedded in the CDATA tag. In any case, if the browser has trouble displaying the XML, will oracle text have trouble indexing the XML and creating the section group zones?
    Second, I understand that the NOT operator takes a right operand term and left operand term. Can either of the terms be the results of the WITHIN operator, i.e. "dogs not (cats within animals)".
    Thank you.

    I bet you just whipped that out, and I thank you with all my
    heart, its amazing to me how many ways I tried to do what you did.
    Thanks
    I have a second question relating to the same problem and
    that is in referencing the over state. Currently, I can write
    'text' into the text field and see what I have coming in from xml
    in its place during the 'up' state.
    However, when the timeline hits the 'over' state, the
    textfield will display nothing, or 'text' if I have that written
    in. I suspect that I am not referencing the'over' state correctly.
    Should I add one line of code sort of referencing the text
    field and not just the button while in the over state?

  • Create Oracle Text Index from Java via JDBC

    Hi, I have a question relevant to creation of the Text Index in Oracle Text via Java JDBC.
    In Java I create client application and I connect to remote Oracle server. (there is Oracle
    10g Enterprise Edition 10.2.0.3.0 on Debian Linux OS). In Java I create query:
    CREATE INDEX index_name ON source_tab(text) indextype is ctxsys.context
    parameters('datastore ctxsys.file_datastore filter ctxsys.null_filter');
    and I start it by:
    PreparedStatement stmt = db.prepareStatement(query);
    ResultSet rs = stmt.executeQuery();
    There is problem that Text Index is created empty and when I write out error log then:
    DRG-11513: unable to open or write to file "path"
    I have on my computer Oracle XE 10g (Windows XP OS) here this application in Java functions
    without problems. Without problems it´s with that same query in SQLPlus when I connect at
    this remote Oracle server via PuTTY.
    Do you know anybody where could be error? Or at worst case where find I more detailed
    manual about JDBC Oracle mainly possible errors and problems with compatibility?

    Does it work if you don't use "file_datastore"?
    Eg. try the following in sqlplus:
    create table t (text varchar2(2000));
    insert into t values ('hello world');
    create index ti on t(text) indextype is ctxsys.context;
    select * from t where contains (text, 'hello') > 0;
    Then drop the index ti and try the same "create index" through JDBC. Does that work?
    If so, then we have some kind of issue with the file_datastore. I assume you are aware that the file will be read by the SERVER, not from the client?
    So if your database resides on a Linux box, but you are calling from a Java program on a windows PC, the file names in source_tab(text) must be in Linux format, and must refer to files which are available on the Linux server (and readable by the owner of the Oracle database process).
    So /home/me/file.txt might work, but C:\Documents\file.txt will not.

  • Will Oracle Text help our project ?

    Hi All,
    We have an existing Oracle Web forms application.
    Now we need to manage around 6000 different kind of documents(word, excel
    and pdf"). This needs to be accessed over internet and we need to have search functionality.
    Can we use Oracle Text for this?
    Thank You
    Rajesh Alex

    Absolutely. One of the many things you can do with OT is check documents via data stored in CLOBs/BLOBs, on a storage device, or via URL.
    Ain't it great? I'm just getting into OT, but it's unreal.

  • Interactive Report Link Column HELP FROM GURUS requested

    Hi,
    I have an interactive report the data of which returns a file name for an image. I would like to use the Link Column (Link to Custom Target) option. The column in my underlying query has the image file name #ILINK#.
    The Target URL is correctly formed using the #ILINK# bind variable http://myserver.mycompany.com/cgi-bin/oracle/img.cgi?img_file=#ILINK#;size=full
    However, for the Link Icon (which I wanted to be a dynamic thumbnail of the linked image). The #ILINK# bind variable is not read. Is this because the Link Icon cannot be dynamically determined and must always be the same image?
    I can get this working as a regular report using HTML expression, but I really wanted to harness the power of an interactive report.
    Thanks

    Hi,
    in this case you could build the required html-tags in your SELECT statement, like this:
    SELECT EMPNO
         , ENAME
         , '<a href="blablabla/index"><img src="'||ENAME||'.gif">'||ENAME||'</a>' AS ENAME_LINK
      FROM EMP
    ;brgds,
    Peter
    Blog: http://www.oracle-and-apex.com

  • Problem with oracle text indexes during import

    We have a 9.2.0.6 database using oracle text features on a server with windows 2000 5.00.2195 SP4.
    We need to export its data ( user ARIANE only ) and then import the result into another 9.2.0.6 database.
    The import never comes to an end.
    The only way to make it work is to use the "indexes=n" clause.
    Then ( without the indexes ), we tried to create manually the oracle text indexes.
    We get this error :
    CREATE INDEX ARIANE.DOSTEXTE_DTTEXTE_CTXIDX ON ARIANE.DOSTEXTE (DTTEXTE)
    INDEXTYPE IS CTXSYS.CONTEXT PARAMETERS('lexer ariane_lexer stoplist ctxsys.default_stoplist storage ariane_storage');
    ORA-29855: erreur d'exécution de la routine ODCIINDEXCREATE
    ORA-20000: Erreur Oracle Text :
    DRG-10700: préférence inexistante : ariane_lexer
    ORA-06512: à "CTXSYS.DRUE", ligne 157
    ORA-06512: à "CTXSYS.TEXTINDEXMETHODS", ligne 219
    We then tried to uninstall Oracle text and install it ( My Oracle Support [ID 275689.1] ). The index creation above still fails.
    We also checked our Text installation and setup through My Oracle Support FAQ ( ID 153264.1 ) and everything seems ok.
    Do we have to create some ARIANE* lexer preferences through specific pl/sql ( ctx_report* ? ) before importing anything from the ARIANE user ?
    What do we need to do exactly when exporting data with oracle text features from one database to another given we used to restore the database through a copy of the entire windows files ?
    Is there a specific order to follow to succeed an import ?
    Thank you for your help.
    Jean-michel, Nemours, FRANCE

    Hi
    index preferences are not exported, ie ariane_lexer + ariane_storage, only the Text index metada, thus the DRG-10700 from index DDL on target/import DB.
    I recommend to use ctx_report.create_index_script on source/export DB, see Doc ID 189819.1 for details, export with indexes=N and then create text indexes manually after data import.
    -Edwin

  • Oracle Text in installing Oracle 10g without licence!!

    Hi. Everyone.
    I've read some thread , but I am still confused about "oracle text".
    Now, I am testing oracle10g database.
    I downloaded 10g software from www.oracle.com, and installed it sucessfully
    on windows xp.
    When I was trying to import a dump file from oracle9i to
    the unlicenced oracle10g database, I got the error , IMP-00017, which
    is related to "Oracle Text".
    I checked "dba_users" dictionary, but ctxsys user is locked and expired.
    I read some thread on this site, and according to the advice, I tried to
    enable oracle text, using "DBCA".
    However, every database option on DBCA is disabled, I was not able to
    check oracle text.
    Lastly, how can I enable "Oracle Text" with unlicenced oracle 10g ?
    Is this possible without licence?
    I am very confused about this.
    I am looking forward to hear your experience and advices.
    Have a nice day.
    Best Regards.
    Ho.

    Well, instead of being confused, you could go to http://www.oracle.com/pls/db102/portal.portal_db?selected=1 and look at
    1) the licensing document, which would tell you whether you need a separate license, and
    2) under the 'Books' tab, look at the Text Application Developer's Guide or the Text Reference manuals for details.
    You could also look for the Oracle Text forum (from the http://forums.oracle.com page, under Database - More, or Text and ask the people who concentrate on that set of features.
    In general, Oracle Text is a set of extensions, the definitions for which are stored under user ctxsys. You would use these extensions by creating your own objects that are based on the extensions.
    For example, suppose your tables contain varchar2 columns. Create indexes that are based on ctxsys's 'context index type' and your application can then use the 'CONTAINS' keyword search capability (which is effectively a ctxsys-owned extension to the select)
    However, you would never log on to ctxsys and do anythibng with that as you risk changing the template code that Oracle has supplied.
    Message was edited by:
    Hans Forbrich
    PS: Yes, Oracle Text is included as part of the base database. Most of it is even included in the free Oracle XE database.

  • Need Help on Oracle text

    Hi Masters,
    I am working on Oracle Text. I have executed the below step/commands. All are executed successfully. But I didn't seen any improvement in my task. But I have one doubt, will explain below.
    create table ent_dnt as select * from entitlement_dnt;
    BEGIN
        CTX_DDL.CREATE_PREFERENCE ('oracletext_datastore', 'MULTI_COLUMN_DATASTORE');
        CTX_DDL.SET_ATTRIBUTE
          ('oracletext_datastore', 'COLUMNS',
            'ORDER_NUMBER, GENERIC_PRODUCT_NAME_EXT, ENTITLEMENT_REF_ID, DEVICE_ASSET_ID, DEVICE_UNIQUE_ID, SWSERVICETAG, PRODUCT_DESC');
    END;
    CREATE INDEX idx_oracle_text
       ON Ent_dnt (search_cols)
        INDEXTYPE IS CTXSYS.CONTEXT
      PARAMETERS ('DATASTORE  oracletext_datastore');
    BEGIN
    DBMS_STATS.GATHER_TABLE_STATS('EE', 'ent_DNT', cascade=>TRUE);
    DBMS_STATS.GATHER_TABLE_STATS('EE', 'upd_DNT', cascade=>TRUE);
    dbms_stats.gather_index_stats('EE', 'idx_oracle_text1');
    dbms_stats.gather_index_stats('EE', 'idx_oracle_text');
    END;
    the above steps are created / executed successfully. But when execute my select query..I didn't seen anywhere oracle text index name in my explain plan.
    Plan
    SELECT STATEMENT  ALL_ROWSCost: 28,393  Bytes: 49,675  Cardinality: 5 
      3 SORT AGGREGATE  Bytes: 8  Cardinality: 1 
      2 TABLE ACCESS BY INDEX ROWID TABLE EE.EE_PROD_GRP_ENTITLEMENT Cost: 4  Bytes: 8  Cardinality: 1 
      1 INDEX RANGE SCAN INDEX EE.IDX_PGE_ENT_ID Cost: 3  Cardinality: 1 
      5 SORT AGGREGATE  Bytes: 8  Cardinality: 1 
      4 TABLE ACCESS FULL TABLE EE.ENT_DNT Cost: 26,781  Bytes: 8  Cardinality: 1 
      20 VIEW EE. Cost: 28,393  Bytes: 49,675  Cardinality: 5 
      19 COUNT STOPKEY 
      18 VIEW EE. Cost: 28,393  Bytes: 49,610  Cardinality: 5 
      17 SORT GROUP BY STOPKEY  Cost: 28,393  Bytes: 2,295  Cardinality: 5 
      16 HASH JOIN OUTER  Cost: 28,392  Bytes: 2,295  Cardinality: 5 
      14 NESTED LOOPS OUTER  Cost: 28,388  Bytes: 1,808  Cardinality: 4 
      11 NESTED LOOPS OUTER  Cost: 28,384  Bytes: 1,600  Cardinality: 4 
      8 HASH JOIN  Cost: 28,383  Bytes: 1,552  Cardinality: 4 
      6 TABLE ACCESS FULL TABLE EE.UPD_DNT Cost: 1,089  Bytes: 174  Cardinality: 6 
      7 TABLE ACCESS FULL TABLE EE.ENT_DNT Cost: 27,292  Bytes: 110,648,108  Cardinality: 308,212 
      10 TABLE ACCESS BY INDEX ROWID TABLE EE.PRODUCT_LICENSE_PART Cost: 1  Bytes: 12  Cardinality: 1 
      9 INDEX RANGE SCAN INDEX EE.IDX_PLP_PD_DATA_ID Cost: 0  Cardinality: 1 
      13 TABLE ACCESS BY INDEX ROWID TABLE EE.PD_KT_DETAILS Cost: 1  Bytes: 52  Cardinality: 1 
      12 INDEX RANGE SCAN INDEX EE.IDX_PKD_PART_NUM Cost: 0  Cardinality: 1 
      15 TABLE ACCESS FULL TABLE EE.LEGACY_CONFIG Cost: 3  Bytes: 35  Cardinality: 5 
    and cost is also so high. But when I ran the below query. I didn't see any $ tables.
    TEST@orcl_11gR2> SELECT object_name, object_type
      2  FROM   user_objects
      3  WHERE  object_name LIKE '%oracle%'
      4  /
    Usually DR$ $I, $K,$N,$R,$X tables are not creaed. where is the problem? please help me. I have to complete this task.
    Regards
    AR

    Hi Roger,
    Thanks alot for your reply. This is my query. Yes I didn't used contain clause in my query. But i don't know how to use.
    SELECT B.*,
           CASE WHEN ISBOUND = 'Y' AND ALLOWRESEND = 'Y' THEN 'Y' ELSE 'N' END
              AS Allowunbind,
           CASE
              WHEN ISBOUND = 'Y' AND IsThisAnUpgrade = 'N' AND Allowresend = 'N'
              THEN
                 'Y'
              ELSE
                 CASE
                    WHEN     ISBOUND = 'N'
                         AND BINDING_TYPE = INITCAP ('TRUSTED')
                         AND ALLOWRESEND = 'N'
                    THEN
                       'Y'
                    ELSE
                       'N'
                 END
           END
              AS AllowBind,
           FNC_GET_GROUPNAME_V3 (B.ENTITLEMENT_ID) GROUP_NAME,
           FNC_GET_USERGROUPNAME_V3 (B.ENTITLEMENT_ID, '[email protected]')
              USER_GROUP_NAME,
           FNC_GET_ROLE_V3 (B.ENTITLEMENT_ID, '[email protected]') ROLE_NAME,
           (SELECT MAX (PGE_IS_ASSIGNED)
              FROM ENT_DNT
             WHERE ENTITLEMENT_ID = B.ENTITLEMENT_ID)
              AS IS_ASSIGNED
      FROM (SELECT *
              FROM (SELECT A.*, ROWNUM RNUM
                      FROM (SELECT *
                              FROM (SELECT *
                                      FROM (SELECT DISTINCT
                                                   ENTDNT.ORDER_DATE,
                                                   ENTDNT.ORDER_NUMBER,
                                                   ENTDNT.ENTITLEMENT_ID,
                                                   ENTDNT.ENTITLEMENT_REF_ID,
                                                   ENTDNT.CUSTOMER_NUM,
                                                   ENTDNT.ENTITLEMENT_STATUS_ID,
                                                   ENTDNT.ENT_QTY,
                                                   ENTDNT.ENTITLEMENTNAME,
                                                   ENTDNT.ACT_KEY_LOB_ID,
                                                   ENTDNT.LIC_KEY_LOB_ID,
                                                   ENTDNT.LICENSE_KEY,
                                                   ENTDNT.ENT_TYPE_ID,
                                                   ENTDNT.PRODUCT_DATA_ID,
                                                   ENTDNT.PRODUCT_NAME,
                                                   ENTDNT.TYPE_DIMENSION_EXT,
                                                   ENTDNT.BINDING_TYPE,
                                                   DECODE (
                                                      ENTDNT.ENT_TYPE_ID,
                                                      1, ENTDNT.PRODUCT_DESC,
                                                      3, ENTDNT.GENERIC_PRODUCT_NAME_EXT)
                                                      AS PRODUCT_DESC,
                                                   DECODE (
                                                      ENTDNT.ENT_TYPE_ID,
                                                      3, PKD.PRIMARY_LICENSE_IDENTIFIER,
                                                      2, 'SOFTWARE_SERVICETAG',
                                                      1, 'ENTITLEMENTID',
                                                      NULL)
                                                      AS PRIMARYLICENSEIDENTIFIER,
                                                   CASE
                                                      WHEN     DECODE (
                                                                 ENTDNT.ENT_TYPE_ID,
                                                                  3, DECODE (
                                                                        PKD.KEY_SOURCE_TYPE,
                                                                        'SOURCE_NO_KEY', 'N',
                                                                        'Y'),
                                                                  1, 'Y',
                                                                  LC.IS_KEY_REQUIRED) =
                                                                  'Y'
                                                           AND ENTDNT.ENTITLEMENT_STATUS_ID =
                                                                  '0'
                                                           AND (   ENTDNT.LIC_KEY_LOB_ID
                                                                      IS NOT NULL
                                                                OR ENTDNT.LICENSE_KEY
                                                                      IS NOT NULL
                                                                OR ENTDNT.ACT_KEY_LOB_ID
                                                                      IS NOT NULL)
                                                      THEN
                                                         'Y'
                                                      WHEN     ENTDNT.ENTITLEMENT_STATUS_ID =
                                                                  '0'
                                                           AND (   ENTDNT.LIC_KEY_LOB_ID
                                                                      IS NOT NULL
                                                                OR ENTDNT.LICENSE_KEY
                                                                      IS NOT NULL)
                                                      THEN
                                                         'Y'
                                                      ELSE
                                                         'N'
                                                   END
                                                      AS KEYREQUIRED,
                                                   ENTDNT.ISTHISANUPGRADE,
                                                   ENTDNT.DEVICE_ASSET_ID,
                                                   ENTDNT.SWSERVICETAG,
                                                   PKD.PHVALUE,
                                                   CASE
                                                      WHEN -- ENTDNT.BINDING_TYPE = 'Trusted'
                                                          ENTDNT.BINDING_TYPE =
                                                              INITCAP ('TRUSTED')
                                                      THEN
                                                         'N'
                                                      WHEN    ENTDNT.BINDING_TYPE =
                                                                 INITCAP (
                                                                    'COMPONENT')
                                                           -- OR ENTDNT.BINDING_TYPE = 'DeviceID'
                                                           OR ENTDNT.BINDING_TYPE =
                                                                 INITCAP (
                                                                    'DEVICEID')
                                                           --OR ENTDNT.BINDING_TYPE = 'ServiceTag'
                                                           OR ENTDNT.BINDING_TYPE =
                                                                 INITCAP (
                                                                    'SERVICETAG')
                                                      THEN
                                                         'Y'
                                                      ELSE
                                                         'N'
                                                   END
                                                      AS ISBOUND,
                                                   CASE
                                                      WHEN     ENTDNT.ENT_TYPE_ID =
                                                                  3
                                                           AND PKD.ALLOW_RESEND =
                                                                  'Y'
                                                           AND ENTDNT.ENTITLEMENT_STATUS_ID =
                                                                  '0'
                                                           AND (   ENTDNT.LIC_KEY_LOB_ID
                                                                      IS NOT NULL
                                                                OR ENTDNT.LICENSE_KEY
                                                                      IS NOT NULL
                                                                OR ENTDNT.ACT_KEY_LOB_ID
                                                                      IS NOT NULL)
                                                      THEN
                                                         'Y'
                                                      WHEN     ENTDNT.ENTITLEMENT_STATUS_ID =
                                                                  '0'
                                                           AND (   ENTDNT.LIC_KEY_LOB_ID
                                                                      IS NOT NULL
                                                                OR ENTDNT.LICENSE_KEY
                                                                      IS NOT NULL)
                                                      THEN
                                                         'Y'
                                                      ELSE
                                                         'N'
                                                   END
                                                      AS ALLOWRESEND,
                                                   ENTDNT.GENERIC_PRODUCT_NAME_EXT,
                                                   PLP.LICENSE_PART_NUMBER
                                                      AS SRVPARTNUMBER,
                                                   ENTDNT.DEVICE_UNIQUE_ID,
                                                   (SELECT MAX (IS_ASSIGNED)
                                                      FROM EE_PROD_GRP_ENTITLEMENT PGE
                                                     WHERE ENTITLEMENT_ID =
                                                              ENTDNT.ENTITLEMENT_ID)
                                                      AS IS_ASSIGNED,
                                                   ENTDNT.SINGLEFILEPERID
                                              FROM ent_dnt ENTDNT,
                                                   PD_KT_DETAILS PKD,
                                                   PRODUCT_LICENSE_PART PLP,
                                                   Legacy_Config LC,
                                                   upd_dnt UPDNT
                                             WHERE     ENTDNT.PRODUCT_GROUP_ID =
                                                          UPDNT.PRODUCT_GROUP_ID
                                                   AND UPDNT.EMAIL_ADDRESS =
                                                          '[email protected]'
                                                   AND ENTDNT.ENT_TYPE_ID =
                                                          LC.ENTITLEMENT_TYPE_ID(+)
                                                   AND PLP.PRODUCT_DATA_ID(+) =
                                                          ENTDNT.PRODUCT_DATA_ID
                                                   AND PKD.PART_NUMBER(+) =
                                                          ENTDNT.LIC_PART_NUM
                                                   AND UPDNT.IS_DELETED = 'N'
                                                   AND ENTDNT.ENTITLEMENT_STATUS_ID IN
                                                          (0, 4)
                                                   AND ENTDNT.IS_DELETED = 'N')
                                     WHERE    (UPPER (GENERIC_PRODUCT_NAME_EXT) LIKE
                                                  '%IDRAC%')
                                           OR (ORDER_NUMBER LIKE '%251608469%')
                                           OR (ENTITLEMENT_REF_ID LIKE '%162523200%')
                                           OR (DEVICE_ASSET_ID LIKE '%162523200%')
                                           OR (DEVICE_UNIQUE_ID LIKE '%162523200%')
                                           OR (SWSERVICETAG LIKE '%162523200%')
                                           OR (UPPER (PRODUCT_DESC) LIKE
                                                  '%162523200%'))
                             WHERE    (UPPER (GENERIC_PRODUCT_NAME_EXT) LIKE
                                          '%575757%')
                                   OR (ORDER_NUMBER LIKE '%251608469%')
                                   OR (ENTITLEMENT_REF_ID LIKE '%162523200%')
                                   OR (DEVICE_ASSET_ID LIKE '%162523200%')
                                   OR (DEVICE_UNIQUE_ID LIKE '%162523200%')
                                   OR (SWSERVICETAG LIKE '%162523200%')
                                   OR (UPPER (PRODUCT_DESC) LIKE '%162523200%')) A
                     WHERE ROWNUM <= 100)
             WHERE RNUM >= 1) B;
    yes..you are 100% correct. I did mistake with like operator. now I executed the below query. displaying all oracle related tables and indexes. Thank you.
    SELECT object_name, object_type
    FROM   user_objects
    WHERE  object_name LIKE '%ORACLE%'
    but here I have a problem. how can i run the below select for my above query?
    SELECT *
      2  FROM  Entitlement_dnt
      3  WHERE  CONTAINS (search_cols, REPLACE (:i_OpenSearchText, ',', ' AND ')) > 0
    here what can I do the value for :I_opensearchText ? confused.
    please help me..!!
    Regards
    AR

  • Help needed with oracle text special character search

    Hi all
    Using oracle 11g sql developer 4.0
    I am facing this challenge where Oracle text when it comes to searching text that contains special character.
    This what I have done so far with help of http://www.orafaq.com/forum/t/162229/
      CREATE TABLE "SOS"."COMPANY"
       ( "COMPANY_ID" NUMBER(10,0) NOT NULL ENABLE,
      "COMPANY_NAME" VARCHAR2(50 BYTE),
      "ADDRESS1" VARCHAR2(50 BYTE),
      "ADDRESS2" VARCHAR2(10 BYTE),
      "CITY" VARCHAR2(40 BYTE),
      "STATE" VARCHAR2(20 BYTE),
      "ZIP" NUMBER(5,0)
       ) SEGMENT CREATION IMMEDIATE
      PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
      STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
      TABLESPACE "USERS" ;
    Insert into COMPANY (COMPANY_ID,COMPANY_NAME,ADDRESS1,ADDRESS2,CITY,STATE,ZIP) values (1,'LSG SOLUTIONS LLC',null,null,null,null,null);
    Insert into COMPANY (COMPANY_ID,COMPANY_NAME,ADDRESS1,ADDRESS2,CITY,STATE,ZIP) values (2,'LOVE''S TRAVEL',null,null,null,null,null);
    Insert into COMPANY (COMPANY_ID,COMPANY_NAME,ADDRESS1,ADDRESS2,CITY,STATE,ZIP) values (3,'DEVON ENERGY',null,null,null,null,null);
    Insert into COMPANY (COMPANY_ID,COMPANY_NAME,ADDRESS1,ADDRESS2,CITY,STATE,ZIP) values (4,'SONIC INC',null,null,null,null,null);
    Insert into COMPANY (COMPANY_ID,COMPANY_NAME,ADDRESS1,ADDRESS2,CITY,STATE,ZIP) values (5,'MSCI',null,null,null,null,null);
    Insert into COMPANY (COMPANY_ID,COMPANY_NAME,ADDRESS1,ADDRESS2,CITY,STATE,ZIP) values (6,'ERNEST AND YOUNG',null,null,null,null,null);
    Insert into COMPANY (COMPANY_ID,COMPANY_NAME,ADDRESS1,ADDRESS2,CITY,STATE,ZIP) values (7,'JOHN DEER',null,null,null,null,null);
    Insert into COMPANY (COMPANY_ID,COMPANY_NAME,ADDRESS1,ADDRESS2,CITY,STATE,ZIP) values (8,'Properties@Oklahoma, LLC',null,null,null,null,null);
    Insert into COMPANY (COMPANY_ID,COMPANY_NAME,ADDRESS1,ADDRESS2,CITY,STATE,ZIP) values (9,'D.D.T  L.L.C.',null,null,null,null,null);
       BEGIN
    CTX_DDL.CREATE_PREFERENCE ('your_lexer', 'BASIC_LEXER');
         CTX_DDL.SET_ATTRIBUTE ('your_lexer', 'SKIPJOINS', '.,@-'''); -- to skip . , @ - ' symbols
        END;
      CREATE INDEX my_index2 ON COMPANY(COMPANY_NAME)
         INDEXTYPE IS CTXSYS.CONTEXT PARALLEL
       PARAMETERS ('LEXER your_lexer');   
    SELECT
    company_name
    FROM company
    WHERE CATSEARCH(company.COMPANY_NAME, 'LLC','') > 0
    ORDER BY company.COMPANY_ID;
    output
    company_name
    1 LSG SOLUTIONS LLC
    2 Properties@Oklahoma, LLC
    only return 2 row but should return 3

    I just noticed that I forgot to use an empty stoplist, so I have added that to the revised example below.  Otherwise, it uses a default stoplist that would not index common single-letter words like A and I.
    1. Whtat is Just search on single character 'L'? It give me error.
    Since it uses the NEAR operator, searching for just one letter causes incomplete syntax, asking it to search for L near a missing second value.  So, I have added additional code to allow for just one letter.
    2. How do I do auto refresh on this index on datastore?
    If I add "sync        (on commit)" it does not refresh the previously set token.
    Sync(on commit) does synchronize so that the data is immediately searchable.  You have to either optimize or rebuild or drop and recreate the index to condense the rows in the domain index table.
    3.lastly explanation of
    <seq>NEAR((' || letters_func (:search_string) || '),1,TRUE)</seq>
                      <seq>NEAR((' || letters_func (:search_string) || '),100,TRUE)</seq>
                    <seq>NEAR((' || letters_func (:search_string) || '),100,FALSE)</seq>
    why 100 true and 100 false
    100 is just a default value that I used for the second parameter of near, indicating how close the letters need to be to each other.  True and False are values for the third parameter of near, indicating whether or not the letters must be in the same order or not.  So, it returns the results in the order of first those that are very close to one another and in the same order, then those that may be further away but in the same order, then those that may be further away and in any order.
    SCOTT@orcl12c> CREATE TABLE company_near
      2    (company_id    NUMBER(10,0) NOT NULL ENABLE,
      3      company_name  VARCHAR2(50 BYTE))
      4  /
    Table created.
    SCOTT@orcl12c> SET DEFINE OFF
    SCOTT@orcl12c> BEGIN
      2  Insert into COMPANY_NEAR (COMPANY_ID,COMPANY_NAME) values (1,'LSG SOLUTIONS LLC');
      3  Insert into COMPANY_NEAR (COMPANY_ID,COMPANY_NAME) values (2,'LOVE''S TRAVEL');
      4  Insert into COMPANY_NEAR (COMPANY_ID,COMPANY_NAME) values (3,'DEVON ENERGY');
      5  Insert into COMPANY_NEAR (COMPANY_ID,COMPANY_NAME) values (4,'SONIC INC');
      6  Insert into COMPANY_NEAR (COMPANY_ID,COMPANY_NAME) values (5,'MSCI');
      7  Insert into COMPANY_NEAR (COMPANY_ID,COMPANY_NAME) values (6,'ERNEST AND YOUNG');
      8  Insert into COMPANY_NEAR (COMPANY_ID,COMPANY_NAME) values (7,'JOHN DEER');
      9  Insert into COMPANY_NEAR (COMPANY_ID,COMPANY_NAME) values (8,'Properties@Oklahoma, LLC');
    10  Insert into COMPANY_NEAR (COMPANY_ID,COMPANY_NAME) values (9,'D.D.T  L.L.C.');
    11  Insert into COMPANY_NEAR (COMPANY_ID,COMPANY_NAME) values (10,'LSG COMPANY, LLC');
    12  Insert into COMPANY_NEAR (COMPANY_ID,COMPANY_NAME) values (11,'LSG STAFFING, LLC');
    13  Insert into COMPANY_NEAR (COMPANY_ID,COMPANY_NAME) values (12,'L & S GROUP LLC');
    14  Insert into COMPANY_NEAR (COMPANY_ID,COMPANY_NAME) values (13,'L S & G, INC.');
    15  Insert into COMPANY_NEAR (COMPANY_ID,COMPANY_NAME) values (14,'L.S.G. PROPERTIES, L.L.C.');
    16  Insert into COMPANY_NEAR (COMPANY_ID,COMPANY_NAME) values (15,'LSGS PROPERTIES, LLC');
    17  Insert into COMPANY_NEAR (COMPANY_ID,COMPANY_NAME) values (16,'LSQ INVESTORS, L.L.C');
    18  Insert into COMPANY_NEAR (COMPANY_ID,COMPANY_NAME) values (17,'LHP SHERMAN/GRAYSON, LLC');
    19  Insert into COMPANY_NEAR (COMPANY_ID,COMPANY_NAME) values (18,'Walmart');
    20  Insert into COMPANY_NEAR (COMPANY_ID,COMPANY_NAME) values (19,'Wal mart');
    21  Insert into COMPANY_NEAR (COMPANY_ID,COMPANY_NAME) values (20,'LSG Property Investments, L.L.C.');
    22  Insert into COMPANY_NEAR (COMPANY_ID,COMPANY_NAME) values (21,'1224 S GALVESTON AVE, LLC');
    23  Insert into COMPANY_NEAR (COMPANY_ID,COMPANY_NAME) values (22,'1527 S GARY AVE, LLC');
    24  Insert into COMPANY_NEAR (COMPANY_ID,COMPANY_NAME) values (23,'FIFTEENTH STREET GRILL');
    25  Insert into COMPANY_NEAR (COMPANY_ID,COMPANY_NAME) values (24,'Massa Lobortis LLP');
    26  Insert into COMPANY_NEAR (COMPANY_ID,COMPANY_NAME) values (25,'Risus A Inc.');
    27  Insert into COMPANY_NEAR (COMPANY_ID,COMPANY_NAME) values (26,'Dollar $ store');
    28  Insert into COMPANY_NEAR (COMPANY_ID,COMPANY_NAME) values (27,'L.O.V.E., INC. ');
    29  Insert into COMPANY_NEAR (COMPANY_ID,COMPANY_NAME) values (28,'J-MART LLC ');
    30  END;
    31  /
    PL/SQL procedure successfully completed.
    SCOTT@orcl12c> CREATE OR REPLACE FUNCTION letters_func
      2    (p_string IN VARCHAR2)
      3    RETURN        VARCHAR2
      4  AS
      5    v_string     VARCHAR2(4000);
      6  BEGIN
      7    FOR i IN 1 .. LENGTH (p_string)
      8    LOOP
      9       IF REGEXP_LIKE (SUBSTR (p_string, i, 1), '[A-Z]', 'i')
    10       THEN
    11         v_string := v_string || SUBSTR (p_string, i, 1) || ',';
    12       END IF;
    13    END LOOP;
    14    v_string := RTRIM (v_string, ',');
    15    RETURN v_string;
    16  END letters_func;
    17  /
    Function created.
    SCOTT@orcl12c> BEGIN
      2    CTX_DDL.CREATE_PREFERENCE ('letters_datastore', 'MULTI_COLUMN_DATASTORE');
      3    CTX_DDL.SET_ATTRIBUTE
      4       ('letters_datastore',
      5        'COLUMNS',
      6        'letters_func (company_name) company_name');
      7    CTX_DDL.SET_ATTRIBUTE ('letters_datastore', 'DELIMITER', 'NEWLINE');
      8  END;
      9  /
    PL/SQL procedure successfully completed.
    SCOTT@orcl12c> CREATE INDEX letters_index ON company_near (company_name)
      2  INDEXTYPE IS CTXSYS.CONTEXT
      3  PARAMETERS
      4    ('DATASTORE  letters_datastore
      5       STOPLIST   CTXSYS.EMPTY_STOPLIST
      6       SYNC        (ON COMMIT)')
      7  /
    Index created.
    SCOTT@orcl12c> SELECT COUNT(*) FROM dr$letters_index$i
      2  /
      COUNT(*)
            24
    1 row selected.
    SCOTT@orcl12c> VARIABLE search_string VARCHAR2(100)
    SCOTT@orcl12c> EXEC :search_string := 'LSG'
    PL/SQL procedure successfully completed.
    SCOTT@orcl12c> SELECT SCORE(1), company_id, company_name
      2  FROM   company_near
      3  WHERE  CONTAINS
      4            (company_name,
      5             '<query>
      6            <textquery>
      7              <progression>
      8                <seq>'       || :search_string            || '</seq>
      9                <seq>NEAR((' || letters_func (:search_string) || '),1,TRUE)</seq>
    10                <seq>NEAR((' || letters_func (:search_string) || '),100,TRUE)</seq>
    11                <seq>NEAR((' || letters_func (:search_string) || '),100,FALSE)</seq>
    12              </progression>
    13            </textquery>
    14             </query>',
    15             1) > 0
    16  ORDER  BY SCORE(1) DESC
    17  /
      SCORE(1) COMPANY_ID COMPANY_NAME
            56          1 LSG SOLUTIONS LLC
            56         10 LSG COMPANY, LLC
            56         11 LSG STAFFING, LLC
            56         12 L & S GROUP LLC
            56         13 L S & G, INC.
            56         14 L.S.G. PROPERTIES, L.L.C.
            56         20 LSG Property Investments, L.L.C.
            56         15 LSGS PROPERTIES, LLC
            31         17 LHP SHERMAN/GRAYSON, LLC
             8         21 1224 S GALVESTON AVE, LLC
             4         22 1527 S GARY AVE, LLC
             4         23 FIFTEENTH STREET GRILL
    12 rows selected.
    SCOTT@orcl12c> EXEC :search_string := 'L'
    PL/SQL procedure successfully completed.
    SCOTT@orcl12c> /
      SCORE(1) COMPANY_ID COMPANY_NAME
            78          1 LSG SOLUTIONS LLC
            77          8 Properties@Oklahoma, LLC
            77          9 D.D.T  L.L.C.
            77         10 LSG COMPANY, LLC
            77         11 LSG STAFFING, LLC
            77         12 L & S GROUP LLC
            77         28 J-MART LLC
            77          2 LOVE'S TRAVEL
            77         26 Dollar $ store
            77         24 Massa Lobortis LLP
            77         23 FIFTEENTH STREET GRILL
            77         14 L.S.G. PROPERTIES, L.L.C.
            77         15 LSGS PROPERTIES, LLC
            77         16 LSQ INVESTORS, L.L.C
            77         17 LHP SHERMAN/GRAYSON, LLC
            77         20 LSG Property Investments, L.L.C.
            77         21 1224 S GALVESTON AVE, LLC
            77         22 1527 S GARY AVE, LLC
            76         19 Wal mart
            76         18 Walmart
            76         27 L.O.V.E., INC.
            76         13 L S & G, INC.
    22 rows selected.
    SCOTT@orcl12c> INSERT INTO company_near (company_id, company_name) VALUES (30, 'Laris Gordman llc.'  )
      2  /
    1 row created.
    SCOTT@orcl12c> COMMIT
      2  /
    Commit complete.
    SCOTT@orcl12c> SELECT COUNT(*) FROM dr$letters_index$i
      2  /
      COUNT(*)
            35
    1 row selected.
    SCOTT@orcl12c> EXEC :search_string := 'Laris Gordman llc.'
    PL/SQL procedure successfully completed.
    SCOTT@orcl12c> SELECT SCORE(1), company_id, company_name
      2  FROM   company_near
      3  WHERE  CONTAINS
      4            (company_name,
      5             '<query>
      6            <textquery>
      7              <progression>
      8                <seq>NEAR((' || letters_func (:search_string) || '),1,TRUE)</seq>
      9                <seq>NEAR((' || letters_func (:search_string) || '),100,TRUE)</seq>
    10                <seq>NEAR((' || letters_func (:search_string) || '),100,FALSE)</seq>
    11              </progression>
    12            </textquery>
    13             </query>',
    14             1) > 0
    15  ORDER  BY SCORE(1) DESC
    16  /
      SCORE(1) COMPANY_ID COMPANY_NAME
           100         30 Laris Gordman llc.
    1 row selected.
    SCOTT@orcl12c> EXEC CTX_DDL.OPTIMIZE_INDEX ('letters_index', 'FULL')
    PL/SQL procedure successfully completed.
    SCOTT@orcl12c> SELECT COUNT(*) FROM dr$letters_index$i
      2  /
      COUNT(*)
            24
    1 row selected.

  • Patches 7446163 y 6851110 in order to use Oracle Text from UCM

    Hello, we have Oracle Enterprise Edition 11.2.0.1 on AIX 6.1.0.0 (64 bits). The client want to use Oracle Text from Universal Content Management, he told me about install the patches 7446163 y 6851110 in order to enable Oracle Text from UCM. I reviewed in Metalink but the readme said that those patches are for Oracle 11.1.0.7. That version (11.2.0.1) include already those patches or those are necessary for we can use the funcionality of Oracle Text from Universal Content Management? I reviewed the components installed on database and the Oracle Text is installed and active.
    Thanks for your help.
    Sincerely,
    Ruben Nieto
    DBA

    Hi
    Oracle DB usually would be installed with Oracle Text enabled (the db side) . To use the features for this we need to have OracleText component enabled on UCM which as you mentioned is already installed and enabled on the ucm server .
    If both the above conditions are already met then you would not need to install any further patches.
    Let me know if it is fine on db and ucm .
    Verify that Oracle Text is enabled on db by executing the following query :
    select comp_name, status from dba_registry;
    It should return the the following result : Oracle Text VALID
    To verify if the component for UCM is installed then you would need to check Administration - Configuration for <instance name> - Enabled Components
    Thanks
    Srinath
    Edited by: Srinath Menon on Dec 26, 2010 8:38 PM

  • HT5824 I switched over from an iPhone to a Samsung Galaxy S3 & I haven't been able to receive any text messages from iPhones. Please help with turning my iMessage completely off..

    I switched over from an iPhone to a Samsung Galaxy S3 & I haven't been able to receive any text messages from iPhones. I have no problem sending the text messages but I'm not receivng any from iPhones at all. It has been about a week now that I'm having this problem. I've already tried fixing it myself and I also went into the sprint store, they tried everything as well. My last option was to contact Apple directly. Please help with turning my iMessage completely off so that I can receive my texts.

    If you registered your iPhone with Apple using a support profile, try going to https://supportprofile.apple.com/MySupportProfile.do and unregistering it.  Also, try changing the password associated with the Apple ID that you were using for iMessage.

  • How do i get message+  on my pc... my phone has crashed and i cant get my text messages from it.... please help

    how do i get message+  on my pc... my phone has crashed and i cant get my text messages from it.... please help

    mandingo8005,
    Look no further help is here! Let's get those text messages going on your computer. You need to download the desktop client http://www.verizonwireless.com/wcms/consumer/products/verizon-messages.html to your computer to use Message +. Were you already using Message + on your phone?
    What phone do you have? You mentioned the phone crashed. What issues are you having with the phone?
    JohnB_VZW
    Follow us on Twitter @VZWSupport
    If my response answered your question please click the �Correct Answer� button under my response. This ensures others can benefit from our conversation. Thanks in advance for your help with this!!

  • Index document with Oracle Text from an ECM without saving the content

    Hi,
    I have documents in a ECM (Alfresco, UCM and more) and I would like Oracle Text to index the document without saving the content. I want to save space and not have redundant information. I would use Oracle Text to search for document's identification (ID) and fetch the document from the ECM using the ID.
    Is it possible ?
    Do I have to use Secure Enterprise Search ?
    Thanks
    Simon

    I want to save space and not have redundant information.The database space or the disk space (in OS)?
    If it the database space, it is not possible to index/serach without storing the file conetents.
    using , FILE_DATASTORE you can save the file in the disk (OS) and index them.
    When you remove the file, you need to re-index it.
    I donot see any other ways.
    Do I have to use Secure Enterprise Search ?SES also uses Oracle Text as its base. It also uses FILE_DATASTORE. But the re-indexing part is automated using crawlers.

Maybe you are looking for

  • Facetime & Mail not working(in India).

    When i start Facetime & enter my apple id & password after sometime it says"Could not sign in.Please check your network connection and try again".what is the problem.In case of Mail,I followed the instruction given online by Apple.End result is i get

  • My ipod classic will not charge or turn on

    MY IPOD CLASSIC WILL NOT CHARGE OR TURN ON

  • Oracle Apps Technical or Financial

    Hi, I m working as core DBA since 1 year. now i want to switch to Apps DBA field. But i m confused that oracle are giving many Apps DBA trainings like - 11i install, patch, monitor - Oracle Apps Technical - Oracle Apps Financial. As i m new in apps d

  • Photo stream album isn't deleted and still accessible

    I have shared a new photo through the new photo stream option at iOS6, at the begining I made it public in order to test, then I have deleted all members and disabled the public access but the picture is still public and even accessible even if I del

  • Delete a single Record

    Hai, I used the Jdeveloper11.1.1.3.0 ,I need a delete a particular record in a table by programmatically in ADF . Thanks & Regards, (Nanthini.D).