Wildcard search queries

Oracle 10g 10.2.0.4
Linux
we are having some queries where users are using wildcard for searching data in varchar2 fields. when they use like 'text%" the results are returning fast as it's able to use index. But queries are slow when they use like '%text%' or even like '%text'.
Kindly suggest.
check below for explain plan.
SQL> select * from t_invoice_header where invoice like 'REIM113%';
Execution Plan
Plan hash value: 1419012284
| Id  | Operation                   | Name                  | Rows  | Bytes | Cost (%CPU)| Time     |
|   0 | SELECT STATEMENT            |                       |    75 | 26175 |    68   (0)| 00:00:01 |
|   1 |  TABLE ACCESS BY INDEX ROWID| T_INVOICE_HEADER      |    75 | 26175 |    68   (0)| 00:00:01 |
|*  2 |   INDEX RANGE SCAN          | T_INVOICE_HEADER_IDX2 |    75 |       |     3   (0)| 00:00:01 |
Predicate Information (identified by operation id):
   2 - access("INVOICE" LIKE 'REIM113%')
       filter("INVOICE" LIKE 'REIM113%')
SQL>  select * from t_invoice_header where invoice like '%REIM113%';
Execution Plan
Plan hash value: 717214792
| Id  | Operation         | Name             | Rows  | Bytes | Cost (%CPU)| Time     |
|   0 | SELECT STATEMENT  |                  |  2620K|   872M|   418K  (2)| 01:37:42 |
|*  1 |  TABLE ACCESS FULL| T_INVOICE_HEADER |  2620K|   872M|   418K  (2)| 01:37:42 |
Predicate Information (identified by operation id):
   1 - filter("INVOICE" LIKE '%REIM113%')
SQL>

Think of how an index would be used. An index on INVOICE will be sorted according to the INVOICE, i.e. alphabetically. If you don't specify the first few characters of the INVOICE value, Oracle can't search the index. And it has no idea how selective the condition will be (if you've specified the first few characters, Oracle can get a reasonable guess on selectivity). So Oracle would either have to do a full scan on the index and then do an unknown series of lookups or it would have to do a table scan. The optimizer expects that the table scan is the more efficient plan-- without more information, I have no reason to expect that the optimizer is incorrect.
Depending on what the INVOICE column contains, you could potentially create an Oracle Text index and use a CONTAINS operator rather than using LIKE to search for strings within the string. But that assumes that the invoice data can be parsed reasonably in building the Text index.
Justin

Similar Messages

  • How to do wildcard search?

    Does anyone know I can do wildcard search like *.jpg or my**.jpg? And yes, don't tell me to use the Terminal and copy and paste path.

    Spotlight searches are pretty much wildcard searches, you just don't need the wildcards.
    However, if you want to do it, look at a Raw Query. This post shows some of its capabilities using the Terminal command mdfind, but you can use a Raw Query in the Finder and he talks about how to select that from the criteria menu.
    http://blog.scottlowe.org/2012/07/25/advanced-spotlight-queries-in-the-mac-gui/
    With a Raw Query, you don't use the mdfind command, but the rest of the search is entered into the Find window.
    Also, see here: https://developer.apple.com/library/mac/documentation/carbon/conceptual/spotligh tquery/concepts/queryformat.html

  • Query help - Inventory, warehouse, Price List, AP PO, & wildcard search?

    Hi All,
    I have a query that does a lookup on inventory and returns useful info as onhand, committed, warehouse,
    various price list data etc. It is very useful for our telephone sales guys as they can see all the information
    they need in one quick search. There is a wildcard variable that searches both the ItemCode and ItemName
    fields to return possible results.
    I would like to add one further column to this query.. being the ETA (DocDueDate) of the most recent Open
    AP purchase order that relates to the Item.. if any. I want to return the rest of the result even if there is no
    AP Purchase Order open.
    I have posted two queries below. The first is the original query that works well. It offers wildcard search
    of the ItemCode and ItemName, but does not give me the ETA (DocDueDate) of any open AP Purchase
    orders for the item (what I want).
    The second query does give me everything thing I want returned, but only if I enter the exact ItemCode
    into the variable field. I can no longer do the wildcard search that I also want. Some of our codes are simply
    not practical to remember, and cannot be easily identified. this is why I need the wildcard search to look in
    both the Item and Name column and return possible matches.
    I have both queries below.
    This is the working original query...
    SELECT
    T0.[ItemCode],
    T0.[ItemName],
    CAST (T0.[OnHand] As INT) As ' Total On Hand', 
    CAST ((SELECT OnHand from OITW where ItemCode=t0.ItemCode and WhsCode=01) As INT) As 'Melb Whse', 
    CAST ((SELECT OnHand from OITW where ItemCode=t0.ItemCode and WhsCode=06) As INT) As 'Demo Whse', 
    CAST ((SELECT OnHand from OITW where ItemCode=t0.ItemCode and WhsCode=04) As INT) As 'Bill Car Stock',
    CAST ((SELECT OnHand from OITW where ItemCode=t0.ItemCode and WhsCode=05) As INT) As 'Brett Car Stock',
    CAST (T0.[IsCommited] As INT) As 'Committed',
    CAST (T0.[OnOrder] As INT) As 'On Order',
    (SELECT price from ITM1 where ItemCode=t0.ItemCode and PriceList=6) as 'RRP Inc GST',
    (SELECT price from ITM1 where ItemCode=t0.ItemCode and PriceList=1) as 'RRP Ex GST',
    (SELECT price from ITM1 where ItemCode=t0.ItemCode and PriceList=2) as 'Comp Ex GST',
    (SELECT price from ITM1 where ItemCode=t0.ItemCode and PriceList=3) as 'Std Ex GST',
    (SELECT price from ITM1 where ItemCode=t0.ItemCode and PriceList=4) as 'Pro Ex GST',
    T1.[ItmsGrpNam],
    T2.[FirmName]
    FROM OITM T0  INNER JOIN OITB T1 ON T0.ItmsGrpCod = T1.ItmsGrpCod
    INNER JOIN OMRC T2 ON T0.FirmCode = T2.FirmCode
    WHERE T0.[ItemCode] Like '%%[%0]%%' OR  T0.[ItemName] Like '%%[%0]%%'
    ORDER by T0.[ItemCode]
    For Browse
    This is the new query with the AP PO DocDueDate lookup included. (Wildcard searches dont work anymore)
    SELECT
    T0.[ItemCode],
    T0.[ItemName],
    CAST (T0.[OnHand] As INT) As ' Total On Hand', 
    CAST ((SELECT OnHand from OITW where ItemCode=t0.ItemCode and WhsCode=01) As INT) As 'Melb Whse', 
    CAST ((SELECT OnHand from OITW where ItemCode=t0.ItemCode and WhsCode=06) As INT) As 'Demo Whse', 
    CAST ((SELECT OnHand from OITW where ItemCode=t0.ItemCode and WhsCode=04) As INT) As 'Bill Car Stock',
    CAST ((SELECT OnHand from OITW where ItemCode=t0.ItemCode and WhsCode=05) As INT) As 'Brett Car Stock',
    CAST (T0.[IsCommited] As INT) As 'Committed', CAST (T0.[OnOrder] As INT) As 'On Order',
    (SELECT TOP 1 T0.[DocDueDate] FROM OPOR T0  INNER JOIN POR1 T1 ON T0.DocEntry = T1.DocEntry
    WHERE T1.[ItemCode] = [%0] And  T0.[DocStatus] ='O' ORDER BY T0.[DocDate] Asc) As 'ETA',
    (SELECT price from ITM1 where ItemCode=t0.ItemCode and PriceList=6) as 'RRP Inc GST',
    (SELECT price from ITM1 where ItemCode=t0.ItemCode and PriceList=1) as 'RRP Ex GST',
    (SELECT price from ITM1 where ItemCode=t0.ItemCode and PriceList=2) as 'Comp Ex GST',
    (SELECT price from ITM1 where ItemCode=t0.ItemCode and PriceList=3) as 'Std Ex GST',
    (SELECT price from ITM1 where ItemCode=t0.ItemCode and PriceList=4) as 'Pro Ex GST',
    T1.[ItmsGrpNam],
    T2.[FirmName]
    FROM OITM T0  INNER JOIN OITB T1 ON T0.ItmsGrpCod = T1.ItmsGrpCod
    INNER JOIN OMRC T2 ON T0.FirmCode = T2.FirmCode
    WHERE T0.[ItemCode] Like '%%[%0]%%' OR  T0.[ItemName] Like '%%[%0]%%'
    ORDER by T0.[ItemCode]
    For Browse
    As you can see in query 2, I used the same variable to attempt to lookup the DocDueDate from OPOR.
    This only works if I enter the variable exactly as ItemCode. No longer wildcard search.
    if anyone could offer any assistance it would be most appreciated.
    Best regards,
    John

    Hi István,
    Thanks! That works great.
    The only additional thing I need is to return the DocNum of the Purchase order (DocNum from OPOR). I attempted to do this by adding T.[DocNum] to your suggested query as per below... however it returns error "Only one expression can be specified in the select list when the subquery is not introduced wit EXISTS"
    SELECT
    T0.[ItemCode],
    T0.[ItemName],
    CAST (T0.[OnHand] As INT) As ' Total On Hand', 
    CAST ((SELECT OnHand from OITW where ItemCode=t0.ItemCode and WhsCode='01') As INT) As 'Melb Whse', 
    CAST ((SELECT OnHand from OITW where ItemCode=t0.ItemCode and WhsCode='06') As INT) As 'Demo Whse', 
    CAST ((SELECT OnHand from OITW where ItemCode=t0.ItemCode and WhsCode='04') As INT) As 'Bill Car Stock',
    CAST ((SELECT OnHand from OITW where ItemCode=t0.ItemCode and WhsCode='05') As INT) As 'Brett Car Stock',
    CAST (T0.[IsCommited] As INT) As 'Committed', CAST (T0.[OnOrder] As INT) As 'On Order',
    (SELECT TOP 1 T.[DocNum], T.[DocDueDate] FROM OPOR T  INNER JOIN POR1 Tt ON T.DocEntry = Tt.DocEntry
    WHERE Tt.[ItemCode]=T0.ItemCode And  T.[DocStatus] ='O' ORDER BY T.[DocDate] Asc) As 'ETA',
    (SELECT price from ITM1 where ItemCode=t0.ItemCode and PriceList=6) as 'RRP Inc GST',
    (SELECT price from ITM1 where ItemCode=t0.ItemCode and PriceList=1) as 'RRP Ex GST',
    (SELECT price from ITM1 where ItemCode=t0.ItemCode and PriceList=2) as 'Comp Ex GST',
    (SELECT price from ITM1 where ItemCode=t0.ItemCode and PriceList=3) as 'Std Ex GST',
    (SELECT price from ITM1 where ItemCode=t0.ItemCode and PriceList=4) as 'Pro Ex GST',
    T1.[ItmsGrpNam],
    T2.[FirmName]
    FROM OITM T0  INNER JOIN OITB T1 ON T0.ItmsGrpCod = T1.ItmsGrpCod
    INNER JOIN OMRC T2 ON T0.FirmCode = T2.FirmCode
    WHERE T0.[ItemCode] Like '%%[%0]%%' OR  T0.[ItemName] Like '%%[%0]%%'
    ORDER by T0.[ItemCode]
    For Browse
    Any ideas?
    Many thanks,
    John

  • Wildcard search + thesaurus on xquery

    Hi All,
    I just realized that thesaurus matching is not supported with wildcard search.
    Here is current codes.
    <Searches>
    if (fn:exists(http:get-query-parameter("Ntt"))) then
    for $paramNtt in http:get-query-parameter("Ntt")
         return <Search Mode="AllPartial" Key="i_products_st">{concat("*",concat($paramNtt,"*"))}</Search>
    else ()
    </Searches>
    So, now i am thinking that I can change to somthing like following eql
    <EqlExpression>
    collection()/record[ endeca:matches(.,"i_products_st",$paramNtt,"AllPartial") or endeca:matches(.,"i_products_st",concat("*",concat($paramNtt,"*")),"AllPartial") ]
    </EqlExpression>
    though I didn't test it out yet. I guess there might be some other solution.
    So, I would like to ask if any better way can solve this issue.
    Thanks,

    Are you trying to retrieve the union of (a) records that match the user's search term as literally entered, perhaps expanded by thesaurus and (b) records that match the user's search term as a substring via wildcard?
    If so, then EQL can express that logic. For example, suppose that:
    * the thesaurus contains an entry "truck" <-- --> "lorry"
    * the user enters "truck" in the search box
    EQL: collection()/record[ endeca:matches(.,"i_products_st","truck","AllPartial") or endeca:matches(.,"i_products_st","\*truck\*","AllPartial") ]
    This search filter expression would match records containing: { truck, lorry, trucker, trucking, struck, ... }
    This kind of infix wildcard expression has very broad recall. In this case you would probably also want to assert a relevance ranking strategy based on matching the user's original entry "truck", using Nrr.
    Also worth thinking about search inputs that are multiple words like "truck driver" - would you want to implicitly wildcard every token separately e.g. \*truck\* \*driver\*
    Finally, definitely worth thinking about search inputs that give pathological queries when implicitly wildcarded, like very short tokens e.g. a ==> \*a\*

  • Wildcard Search requirement for Items description and BP Name

    Hi Friends,
    I want to know is there any feature in Item Master data or Business Partner Master Data in which search is done by putting middle or last name. For example the Item Name is Electric Motar 345 Gear
    and when the user wants to search it by say Motar 345 then all items which inclused Motar 345 should come highlighted.
    Same for BP also its required as BP name is Glem Tex Japan Pvt Limited and now user wants to search the BP by say Tex Japan and all BP which includes the word Tex Japan should come.
    Is there any possibilities by which this can be achieved. Its somewhat wildcard search required. I heared its possible in B1.
    Regards,
    Kamlesh Gupta

    Dear Sridharan,
    I have exactly put the same as 'Motar 345 after Opening the Item Master Data and in find mode pressed * Enter and put the above in Find and selected Item Description. But sorry to say that nothing is coming and the cursor goes in the last item master data.
    What might be the problem can you please tell me.
    Regards,
    Kamlesh Gupta

  • Oracle BI Publisher - Passing multiple wildcard search to a bind variable

    Hi,
    Please help me in resolving the below mentioned issue:
    I have developed a report in oracle BI Publisher with a SQL query.
    While scheduling the report to run I used to pass mutilple parameters like CGAMSVC08,RLCSVC51
    If the pass the parameter with wildcard search like C% it works.
    When I pass two or more parameter values with wildcard search like C%,R% its not working.
    Could you please let me know how should I give the bind variable in the SQL query. Currently I'm paramater like the one shown below for passing multiple paramaters:
    Where (',' || :PRMRETRID || ',' like '%,'||RL.RETROFIT_ID|| ',%')
    Edited by: user1101445 on May 23, 2012 2:02 AM

    HI Tyler.
    Well, here's the latest.
    I found this little gem in the BIEE 10.1.3.3.3 Release Notes Documentation...
    This issue applies to Versions 10.1.3.3, 10.1.3.3.1, 10.1.3.3.2, and 10.1.3.3.3.
    Reports that use the BI Publisher data template as the data model may fail with the
    following error: "Data not defined."
    This error will occur if you defined a parameter in your data template but you do not
    pass a value to it via the user interface. If you do not specify this parameter in the "Parameters" section of the report definition that you created using the BI Publisher Edit Report interface, then you will receive the error.
    To work around this issue, either define the parameter in the Edit Report interface or remove the parameter from the data template.
    That bit is now working.
    Having set this up and using your guide it works if my SOAP parameters declaration passes a single value like this...
    <parameterNameValues>
    <item>
    <name>P_INVOICE_ID</name>
    <multiValuesAllowed>true</multiValuesAllowed>
    <values>
    <item>16641</item>
    </values>
    </item>
    </parameterNameValues>
    But if I try and pass two or more like this...
    <parameterNameValues>
    <item>
    <name>P_INVOICE_ID</name>
    <multiValuesAllowed>true</multiValuesAllowed>
    <values>
    <item>16641,18421</item>
    </values>
    </item>
    </parameterNameValues>
    BIP states "java.sql.SQLException: ORA-01722: invalid number"
    My SQL where clause is..
    <sqlStatement name="Q1">
    <![CDATA[select * from vw_invoice_summary
                   where invoice_summary_id IN (:P_INVOICE_ID)]]>
    </sqlStatement>
    And the BIP error records the parameter value as P_INVOICE_ID 16641,18421 (which are legit invoice IDs)
    In summary, works if I pass one invoice ID, fails if I pass two or more.
    Any ideas? Or do you reckon this is now a post for the BIP forum?
    Kind regards.
    Simon

  • SharePoint 2013 Online - Default Wildcard Search

    Is there a way I can change SP to always append a * to the end of every search?
    We're using the Online version (tied in with O365), and it has been requested that we have every search be a wildcard search by default. I found walkthroughs for SharePoint 2010, but the interface and menus have changed in 2013.

    You can edit the Search Results Web Part. Then from the web part properties, click on Change Query.
    Now in the popup modal window, click on "Advanced Mode".
    In Query text, you can use {SearchBoxQuery}*

  • Address Book wildcard searching LDAP

    With Address Book under Mac OS X 10.4 (Tiger), and 10.5 (Leopard) it was possible to do a wildcard search of an LDAP server for contacts. You did this by typing *. or ** in the search box in the top right.
    Unfortunately, this no longer seems to work in Address Book in Mac OS X 10.6 (Snow Leopard).
    Does anyone know of an alternative way of doing this?

    Do you use iCloud? If so, try going to the System Preferences then iCloud and unchecking Contacts. It will warn you about deleting the contacts from your Mac. If you know your other devices on iCloud have the correct contacts(or icloud.com) then this should be completely safe. Once you've okayed them to be removed, immediately recheck contacts.
    Please let me know if this works. Thanks!
    Autumn

  • Can't perform wildcard searches

    Hello world,
    We're using Portal 3.0.9.8.1 with Patch 1949492 installed. This is on 8.1.7.2.4 SE Database.
    When performing a search, cannot include wildcards. E.g. a search for 'test' returns only the exact word 'test'. It does not return 'testing','tester','test1','detests'.
    This is against what Portal's Own Help file states. Click 'Search Tips' on the 'Advanced Search Page' and you are told the following:
    The % character is interpreted literally, so do not include it as a wildcard. If you enter 100% as your search term, search finds content that contains the text 100%, not 1000 or 10000. Wildcards are automatically added to the beginning and end of your search term, so searching for 100 will automatically return content that contains 1000 and 10000.
    If interMedia is installed and enabled, search automatically uses the stem operator to search for words that have the same linguistic root as the specified word. For example, if you specified the word lift, the search feature will return content that contains the words lift, lifting, lifted, etc.
    Both of these statements are blatantly untrue as it does neither.
    Any thoughts Oracle? Has anyone else managed a wildcard search?
    Frustrated
    Dave

    I've just verified in 3.0.9 and wildcards are applied as specified in the documentation, when Text is not enabled. If your search term is 'test' then the SQL query will have the search term %test%. Literal % signs in your search term are escaped, so that if your search term was test% then the query would be for %test^%% escape ^.
    There are a few things to remember. When searching WITHOUT Intermedia Text enabled the search will only match terms in the title and description of the item.
    When, Intermedia Text is enabled, all of the content will be searched. However, as indicated in the documentation, the stem operator will be used. So if you search for 'test' the query is now a Text contains('$test') type query. The default operator is the '$' stem operator, which match terms that have the same linguistic root. So if your search term is 'test' it should match 'tests' or 'testing' or 'tested'. However, it will not match 'test1'. Please refer to the Intermedia Text documenation for more information on the stem operator and Text searching in general.

  • Is it possible to save/export and load search queries?

    Currently, when I open the Find/Replace window (Apple+F), I see a long list over every query I have saved in the dropdown menu. This is not ideal for me because of the 100 queries, I might only use 1–10 for Project A, 11–20 for Project B, and so on. Is it possible to export and save a group of search queries in one file, a second group in a second file, and so on? I would like to be able to load only the search queries that are relevant to a specific project and have in mind something akin to the "save" and "load" options in the swatches panel and styles panels.
    I hope my question is clear, but please let me know if you would like additional information.

    Your saved queries are stored as individual xml files in the Find-Change Queries folder in the prefs written in your user profile/library. Queries in subfolders don't seem to show up in the dialog list. It seems reasonable that you might be able to save sets in subfolders, then copy them into the main folder when you want them, but doing it manually would be a major pain. If multi-find/change doesn't do it for you already, it might be worth asking in the scripting forum if anyone could help with a script that would.

  • Wildcard searches for WBS element

    HI Experts,
    Can anyone give a example prgm for wildcard searches to WBS element LIPS-PS_PSR_PNR field.
    Thanks in advance.

    Hi,
    This is standard system behaviour. Purchase requisitions generated by MRP do not add to commitment. However, when these PRs are converted into POs, the POs add to commitment. Purchase requitions genertaed directly from PS, without the intervention of MRP always add to commitments.
    Regards
    Muraleedharan.R

  • Wildcard search in SharePoint 2013.

    Hi ,
    I have SharePoint 2013 farm, which is migrated from 2010 to 2013. After migrating to SharePoint 2013, wild card search is not working. Could someone please help me in activating wildcard search for already configured search service application in SharePoint
    2013.
    Thanks,
    Badri.
    Badri

    Hi
    I am trying to do a partial search without using wildcard by setting the query text of the search result source to {searchTerm}*. The search works and gives me the right results. However,
    the results look differently.
    When I do search for abcd*, the words that are started with abcd in the Title, Summary and Path parts are highlighted.
    And when I do search for abcd, I have exactly the same search results back. but the words are not highlighted. and besides that, the Summary text is different.
    I believe even if I had the right search result items back, the Title, Summary, and Path properties are created based on the searchEntry. Is there any way to make the items look exactly the same without manipulating with the searchEntry value?
    Thank you,
    Tatiana

  • Move to next record / wildcard search

    Hi
    Hope you can understand this explanation..
    I have searchable database for Holiday & Residential
    property here
    http://www.roomtobreathesl.com
    (search facility in the navigation menu)
    The results page for this search works fine for when you
    specify a certain
    area, certain amount of beds etc as it only shows a small
    amount of
    properties.
    However when you do a search for any area / any amount of
    rooms / any type,
    the query brings up over 40 results, so a move to next record
    is used. This
    is where the problem lies. You cannot move to next record as
    the 'Next
    record' link is looking for another wildcard search (see
    status bar).
    Any ideas how to remedy this?
    Thanks for any help
    Gary

    oops!
    Sorry sent you the previous version that's online.
    I also tried doing a search and replace and changing all
    'Request.Form' to
    'Request'
    Still didn't work.
    This is how it was when it wasn't working.
    <%@LANGUAGE="VBSCRIPT"%>
    <!--#include file="Connections/YotShop6.asp" -->
    <%
    Dim rsResults__MMColParam
    rsResults__MMColParam = "1"
    If (Request("yscon") <> "") Then
    rsResults__MMColParam = Request("yscon")
    End If
    %>
    <%
    Dim rsResults__ysbed
    rsResults__ysbed = "1"
    If (Request("ysbed") <> "") Then
    rsResults__ysbed = Request("ysbed")
    End If
    %>
    <%
    Dim rsResults__MMColParam3
    rsResults__MMColParam3 = "xyz"
    If (Request("type") <> "") Then
    rsResults__MMColParam3 = Request("type")
    End If
    %>
    <%
    Dim rsResults
    Dim rsResults_numRows
    Set rsResults = Server.CreateObject("ADODB.Recordset")
    rsResults.ActiveConnection = MM_YotShop6_STRING
    rsResults.Source = "SELECT * FROM YotStock WHERE Area LIKE '"
    +
    Replace(rsResults__MMColParam, "'", "''") + "' AND bedrooms
    LIKE '" +
    Replace(rsResults__ysbed, "'", "''") + "' AND type LIKE '" +
    Replace(rsResults__MMColParam3, "'", "''") + "' ORDER BY
    price ASC"
    rsResults.CursorType = 0
    rsResults.CursorLocation = 2
    rsResults.LockType = 1
    rsResults.Open()
    rsResults_numRows = 0
    %>
    "Julian Roberts" <[email protected]> wrote in message
    news:euj4if$ici$[email protected]..
    >>> Use Request instead of Request.Form for runtime
    parameters.
    >
    > You haven't done it :)
    >
    > --
    > Jules
    >
    http://www.charon.co.uk/charoncart
    > Charon Cart 3
    > Shopping Cart Extension for Dreamweaver MX/MX 2004
    >
    >
    >
    >

  • Wildcard search with catsearch on Oracle 10g

    Wildcard search problem is being discussed many times, however the solutions provided did not solve the problem.
    I am using catsearch to take its advantages and return results at a faster rate. Aim is to simulate a like '%abc%' using catsearch in 10g.
    Following are the steps to reproduce the problem.
    CREATE TABLE test
       (name VARCHAR2(60))
    INSERT ALL
    INTO test VALUES ('VCL Master')
      INTO test VALUES ('VCL Master S.')
      INTO test VALUES ('VCL Master S.A. Compartment 1')
      INTO test VALUES ('VCL MasterS.A. Compartment 2')
      INTO test VALUES ('VCL Master., S.A.')
      INTO test VALUES ('KCL Master Corp.')
      SELECT * FROM DUAL
    begin
    ctx_ddl.create_preference('Jylex', 'basic_lexer');
    ctx_ddl.set_attribute('Jylex','SKIPJOINS','.-=[];\,/~!@#$%^&*+{}:"|<>?`§´¨½¼¾¤£€©®''');
    end;
    begin
        Ctx_Ddl.Create_Preference('wildcard_Jylex', 'BASIC_WORDLIST');
        ctx_ddl.set_attribute('wildcard_Jylex', 'wildcard_maxterms', 15000) ;
    end;
    CREATE INDEX test_inx ON test(NAME)
    INDEXTYPE IS CTXSYS.CTXCAT
    PARAMETERS('STOPLIST CTXSYS.EMPTY_STOPLIST
    LEXER     Jylex
    WORDLIST wildcard_Jylex')
    problem1:
    select * from test where catsearch(name, 'CL Mast*', NULL)>0 --- no results returned
    problem 2:
    when I run the following query on the actual column of my table with 3 million records,
    select * from XXXX where catsearch (NAME, 'VCL Master S*', NULL) > 0
    I get the following error.
    DRG-51030: wildcard query expansion resulted in too many terms
    I have used () and "". Did a lot of R&D and still I am not able to a solution that resolves both of the problems.
    Suggestions will be much appreciated.
    Thanks.

    This post has nothing to do with Oracle Objects.  Perhaps some moderator will move it to the Oracle Text sub-forum/space, where it belongs.
    Your search for 'CL Mast*' did not find any rows because there aren't any rows that match that criteria.  If you want to return rows that have that string, then you need to add a leading wildcard.  Technically CTXCAT indexes and CATSEARCH do not support leading wildcards, but you can use two asterisks as a workaround, so you can search for '**CL Mast*'.
    Your wildcard_maxterms is set to 15000, so if there are more than 15000 words that begin with 's' in your 3 million records, then it will result in an error.  If you upgrade to Oracle 11g, then you can set the wildcard_maxterms higher or to unlimited by setting it to 0, but that may cause your system to run out of memory.  Most applications trap these errors and return a simple message to the user, indicating that the search for s* is too broad and to narrow the search.
    I would use a CONTEXT index with CONTAINS instead of CTXCAT and CATSEARCH.  It supports leading wildcards and you can index substrings for faster searches.  If you want it to be like the CTXCAT index then you can make it transactional.

  • Wildcard Search

    Can anyone tell me if the (?) is standard wildcard search functionality in ISU.  The glossary gives the following description, however this does not seem to be funtionong in our system. Maybe it's something we can flip a swith on.
    SAP's Definition of "Wildcard Search"
    A search using * to replace any string of characters and ? to replace any single character in a word.
    Thanks
    Lisa

    One of my users had asked about using the ? wildcard to replace a single character when performing a search.
    When we looked up the information in the glossary, the definition led us to think that this was an option in SAP.  We had not been using this functionality and wanted to know if it was standard functionality, and maybe we just needed to activate it.
    So thank you for the response, I can now inform my user that this is not standard SAP, and is not available, unless we make a change to the code.
    Cheers
    Lisa

Maybe you are looking for

  • Set up new iMac user accounts & storage locations

    I just made the switch from Windows PC to a new iMac  since it is still in the box I thought I would take some time to think about how I want to set it up before opening it and starting to dump all my files onto the new machine. I'd like to have an e

  • AE CS6 crashes while trying to open CS5 project

    First issue that comes upon opening a particular CS5 project into CS6 is that DE_FreeForm plug-in is notified as missing. Ok. Then tries to load a comp and crashes. Project opens fine in CS5. I removed DE_FreeFormAE, will not open in CS6. Help please

  • View as Icon in LV7

    Hello, is there an option that the new controls, indicators, ... are at once placed as always and not as "Icon"? I always have to remove the "View as Icon" thing to have the old LV6-look. Thanks

  • Can anyone sort out ths problm

    Not generating accounting document Error Log             0900038457 000000 Document 900038457 saved (error in account determination)            Technical data                Tech. data details                 Client                 Group Number      

  • Get the MCC and the MNC of the SIM card and of the network

    Hello, We publish a network speed and quality measurement application used on desktop, tablet and smartphone. This application is called nPerf. It is available on desktop via a web browser at www.nperf.com, on iOS at ios.nperf.com and Android at andr