Search for Special Character in  Oracle Text CONTAINS Query

Hi,
We have to write few query which will search for email id in the Oracle Text.
The Search text will be like <[email protected]> .
So email id should be searched correctly with the @ symbol.
Similarly we want the following special character to be searched in the Text like ",',*

You will need to escape the special characters by either using \ in front of each special character or putting {} around the whole phrase that contains the special characters, as per the online documentation:
http://download.oracle.com/docs/cd/B28359_01/text.111/b28304/cqspcl.htm#CCREF2091

Similar Messages

  • Oracle Text contain query limit with 9i

    The Oracle Text contain query is defined as this:
    CONTAINS(
    [schema.]column,
    text_query VARCHAR2
    [,label NUMBER])
    RETURN NUMBER;
    Is the size limit of text_query 4000 bytes with 9i? Is it increased with 10g or is it accepting CLOB in 10g?
    I always got the error: "ORA-01460: unimplemented or unreasonable conversion requested" when I do the following where p_var was dynamically passed with size of more than 4000 bytes:
    p_statement varchar2(20000);
    p_var varchar2(8000);
    p_statement := select count(*) from dewey_table where contains(concat, :x)>0;
    open m_cursor for p_statement using p_var;
    Thanks very much,
    Kevin

    The limit is definitely 4000 characters in 9i and the 10g documentation shows no change in the calling spec for that parameter.

  • Search for a character in a text file

    I have a text file generated using utl_file. After this is generated, I want to search for a specific character in the file. If found, I want to edit the file and remove/replace this character.
    Any ideas are appreciated.
    Thanks

    If your application resides on unix box, you can use OS command to find and replace, something like "sed" in unix, do a man on sed and find out the details.

  • Searching for XML tags using Oracle Text

    I am using full text search to find documents based on a search text. It works fine for pdf, word documents, etc. However for XML documents, searching for a particular tag name does not find anything. Searching for text within tags works fine. Any thoughts?
    Edited by: miyer on Feb 21, 2011 6:25 PM

    Hi
    Try adding the following variable to ucm config.cfg and then see if a new xml checkin returns the result for FT search :
    TextIndexerFilterFormats=xml
    Save the file , restart UCM and then test .
    If the new checkin gets the results as expected then execute Collection Rebuild cycle to have the existing contents as well FT indexed to be searchable (for XML).
    Thanks
    Srinath

  • Verity Search for Special Character

    I am using simple search in CFSEARCH and need to find a word
    like "@Google". CFSearch always ignores the @ sign and find all the
    documents with word "Google". I only want it to match the word
    where there is a @ in front of Google.
    Anyway to do that? I have tried the backslash and it didn't
    work.
    Thanks,
    Brian

    Have you tried using EXPLICIT or INTERNET query types rather
    than SIMPLE?

  • Search for a space within a text field

    Hi All
    I am trying to search for a sapce within a text field but sofar not being very successful. I have used:
    FIND search_str
               IN text_str
               MATCH COUNT  lv_mcnt
               MATCH OFFSET lv_moff.
    where search_str = TYPE c VALUE ' '.
    I am looking a way of searching a character within the string using ABAP (like INSTRING in other languages). If you have similiar codes - Could you please post me a copy - Thanks

    HI
    Check this..
    DATA string7(30) TYPE c VALUE 'This is a little sentence.'.
    WRITE: / 'Searched', 'SY-SUBRC', 'SY-FDPOS'.
    ULINE /1(26).
    SEARCH string7 FOR 'X'.
    WRITE: / 'X', sy-subrc UNDER 'SY-SUBRC',
                   sy-fdpos UNDER 'SY-FDPOS'.
    SEARCH string7 FOR 'itt   '.
    WRITE: / 'itt   ', sy-subrc UNDER 'SY-SUBRC',
                       sy-fdpos UNDER 'SY-FDPOS'.
    SEARCH string7 FOR '.e .'.
    WRITE: / '.e .', sy-subrc UNDER 'SY-SUBRC',
                      sy-fdpos UNDER 'SY-FDPOS'.
    SEARCH string7 FOR '*e'.
    WRITE: / '*e ', sy-subrc UNDER 'SY-SUBRC',
                    sy-fdpos UNDER 'SY-FDPOS'.
    SEARCH string7 FOR 's*'.
    WRITE: / 's* ', sy-subrc UNDER 'SY-SUBRC',
                    sy-fdpos UNDER 'SY-FDPOS'.
    Thanks ,
    Praveen

  • UDF for Special Character Conversion

    Hello All,
    Can any one help me with the UDF for special character conversion code.
    I mean if a special character is given it should pass a blankspace.
    << Moderator message - Everyone's problem is important >>
    Many thanks,
    Rahul.
    Edited by: Rob Burbank on Oct 29, 2010 4:32 PM

    Hi Rahul ,
    the best way to deal with special character is to use proper encoding in your Sender Communication channel it self .So that in your payload you will get proper value .
    IF you are getting some special character which is not covered in encoding UTF-8 thne you can use encoding IS0-8859-1 .You can easily refer in help that how to use encoding in your communication channel .
    Regards,
    Saurabh

  • How to search for a word in a text editor

    Hi,
       I have created a custom container and added some text to it. Is there any method to search for words in this?

    Lilan,
    To search a character field for a particular pattern, use the SEARCH statement as follows:
    SEARCH <c> FOR <str> <options>.
    The statement searches the field <c> for <str> starting at position <n1>. If successful, the return code value of SY-SUBRC is set to 0 and SY-FDPOS is set to the offset of the string in the field <c>. Otherwise, SY-SUBRC is set to 4.
    The search string <str> can have one of the following forms.
    <str>
    Function
    <pattern>
    Searches for <pattern> (any sequence of characters). Trailing blanks are ignored.
    .<pattern>.
    Searches for <pattern>. Trailing blanks are not ignored.
    *<pattern>
    A word ending with <pattern> is sought.
    <pattern>*
    Searches for a word starting with <pattern>.
    Words are separated by blanks, commas, periods, semicolons, colons, question marks, exclamation marks, parentheses, slashes, plus signs, and equal signs.
    <option> in the SEARCH FOR statement can be any of the following:
    ABBREVIATED
    Searches the field <c> for a word containing the string in <str>. The characters can be separated by other characters. The first letter of the word and the string <str> must be the same.
    STARTING AT <n1>
    Searches the field <c> for <str> starting at position <n1>. The result SY-FDPOS refers to the offset relative to <n1> and not to the start of the field.
    ENDING AT <n2>
    Searches the field <c> for <str> up to position <n2>.
    AND MARK
    If the search string is found, all the characters in the search string (and all the characters in between when using ABBREVIATED) are converted to upper case.
    Pls. Mark

  • How to insert special character from Oracle form builder 10g

    Dear all,
    I need help. how to insert special character like 'Superscript or Subscript ' from oracle form builder 10g. I had try in Oracle form builder 6i with press ALT+ASCII code in the text item and it work, but in the oracle form builder 10g this method doesn't work... would you like to help me...somebody please...
    Best Regard,
    Dedy P.T.

    What do you mean by insert ... from Forms Builder? Do you mean you want to add it as text in a string of pl/sql code or as part of boiler plate text (label) or a value on the Property Palette?
    For special characters you would need set NLS_LANG to something that would support the characters you want to use. For the Builder to see the change, you would need to set NLS_LANG to something like:
    NLS_LANG=AMERICAN_AMERICA.UTF8
    This can be done in the Windows Registry or system. As I mentioned, this will only apply to the Builder and will have nothing to do with a running form. For running forms you would need to set this in default.env. As for things like super and sub scripts, these are font formats and not necessarily characters. For the most part, I don't believe these are supported in Forms.

  • Searching for percent character (%) in a string

    Hi All,
    A strange request from one of our developers that I have not come across before.
    Is there a way to search for a percent character (%) in a string and also use the wildcard special character (%)?
    i.e. to return all values with a percent character (%)
    e.g. select column1 from table1 where column1 like '%%';
    When I do this all records are returned.
    Regards!!

    or use an INSTR function.If INSTR comes, can REGEXP be far behind ? - Ode to the Warren Tolentino... ;)
    test@ORA10G>
    test@ORA10G> @ver1
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
    test@ORA10G>
    test@ORA10G> with t as
      2   (select 'the percentage (%) determines the final results' remarks from dual union all
      3    select 'otherwise non at all' remarks from dual)
      4  select * from t
      5  where regexp_like (remarks,'%');
    REMARKS
    the percentage (%) determines the final results
    test@ORA10G>
    test@ORA10G> with t as
      2   (select 'the percentage (%) determines the final results' remarks from dual union all
      3    select 'otherwise non at all' remarks from dual)
      4  select * from t
      5  where regexp_instr (remarks,'%') > 0;
    REMARKS
    the percentage (%) determines the final results
    test@ORA10G>
    test@ORA10G>pratz

  • Oracle text contains and mixed queries

    Trying to optimize the following sql statement using oracle text.  When postal code is given, I would like to limit the contains to only filter the smaller subset.  Both of these queries produce the same results in the same amount of time with practically identical explain plans. Is there any way to get contains to only search the subset of postal codes and not the entire table.
    select *
    from ADDRESS
    where CONTAINS(ADDRESS1_TEXT, ' "1%" AND "%str%" ') > 0
    and POSTAL_CODE like '77539%'
    select *
    from ADDRESS
    where address_id in (select address_id from address where POSTAL_CODE like '77539%')
    and CONTAINS(ADDRESS1_TEXT, ' "1%" AND "%str%" ') > 0
    Thanks for any help,
    Gus

    You can use FILTER BY in the index creation and SDATA in the query, as shown below.
    SCOTT@orcl12c> CREATE TABLE address
      2    (address1_text  VARCHAR2(15),
      3      postal_code    VARCHAR2(15))
      4  /
    Table created.
    SCOTT@orcl12c> INSERT INTO address VALUES ('12 astrb', '775391')
      2  /
    1 row created.
    SCOTT@orcl12c> INSERT INTO address
      2  SELECT SUBSTR (object_name, 1, 15),
      3          object_id
      4  FROM  all_objects
      5  /
    89979 rows created.
    SCOTT@orcl12c> CREATE INDEX test_idx
      2  ON address (address1_text)
      3  INDEXTYPE IS CTXSYS.CONTEXT
      4  FILTER BY postal_code
      5  /
    Index created.
    SCOTT@orcl12c> SET AUTOTRACE ON EXPLAIN
    SCOTT@orcl12c> SELECT * FROM address
      2  WHERE  CONTAINS
      3            (address1_text,
      4            '"1%" AND "%str%" AND SDATA (postal_code LIKE ''77539%'')') > 0
      5  /
    ADDRESS1_TEXT  POSTAL_CODE
    12 astrb        775391
    1 row selected.
    Execution Plan
    Plan hash value: 3864510387
    | Id  | Operation                  | Name    | Rows  | Bytes | Cost (%CPU)| Time    |
    |  0 | SELECT STATEMENT            |          |    44 |  1320 |    13  (0)| 00:00:01 |
    |  1 |  TABLE ACCESS BY INDEX ROWID| ADDRESS  |    44 |  1320 |    13  (0)| 00:00:01 |
    |*  2 |  DOMAIN INDEX              | TEST_IDX |      |      |    4  (0)| 00:00:01 |
    Predicate Information (identified by operation id):
      2 - access("CTXSYS"."CONTAINS"("ADDRESS1_TEXT",'"1%" AND "%str%" AND SDATA
                  (postal_code LIKE ''77539%'')')>0)
    Note
      - dynamic statistics used: dynamic sampling (level=2)
    SCOTT@orcl12c>

  • Script to search for special data in folder

    Hi, 
    I use several folders, which have several data called .txt at the end. Some of the folder have no .txt datas and some folder have one or two of .txt datas. 
    I want to write a script which makes it possible for me to search for the .txt datas in the folders and let me know the Name of the data. 
    At the moment, I have no idea how to search in folders for special data. 
    Maybe somebody of you know how I could programme this code?
    Thank you very much for your help. 
    Best regards, 
    Mosquito

    Hello Mosquito,
    There is no Script required to do what you are trying to do based on my understanding of your explanation.
    You just need to follow these two steps:
    1. Add ALL the directories you wish to search for you *.TXT files to the DataFinder Search Areas, be selecting a grey folder in the NAVIGATOR, right-clicking the folder and then selecting "Add Search Area ...". This will ass the grey folder to the "Search Areas" = Yellow folders on top the the tree view in the "My DataFinder" view of the NAVIGATOR.
    2. In the NAVIGATOR panel, find the text box on top of the file system hierarchy view, and type "*.txt" into the <Enter search text> field as shown in the screen shot below. Press the "Search" button to the right of the text field, and you will get a list of all *.txt files that are contained within your yellow search area directories.
    That's it. No scripting required ...
    Let me know if that helps.
         Otmar
    Otmar D. Foehner
    Business Development Manager
    DIAdem and Test Data Management
    National Instruments
    Austin, TX - USA
    "For an optimist the glass is half full, for a pessimist it's half empty, and for an engineer is twice bigger than necessary."

  • Is there a way to Search (List search) for more then one field text from a column for Bulk uploading?

    I've been trying to find more information on this and I apologies if this has already been answered. I just don't know the correct way to ask this. We have a SharePoint List at the company that we have people input information into different columns. The
    problem is most of those information are very repetitive. Is there a way for me to search more then one field text in the column and just input that same information in?
    ex:
    Column 1
    Column 2
    Date:
    883851
    MidWest
    User input 
    8831518
    MidWest
    User input
    On the search field in the SharePoint List, I would need to search for 883851, 8831518 etc,  would view those requested numbers, then I would click edit and change dates to those rows. Does that make sense? I'm sorry I'm fairly new at sharepoint.

    I think what you're asking is about having repetitive options in a list, show up easily for new items being created.
    This can be done by setting the columns that contain repetitive information to Choice fields.  In the configuration of the Choice field, check the box for "Allow custom values".  Now as users are entering data into the list, the dropdown of options
    for a given field grows and users can quickly see and select previously entered and thus repetitive values for the given fields.
    I trust that answers your question...
    Thanks
    C
    |
    RSS |
    http://crayveon.com/blog |
    SharePoint Scripts | Twitter |
    Google+ | LinkedIn |
    Facebook | Quix Utilities for SharePoint

  • Searching for numeric values in a text field / SQL Server

    Hi all,
    here's a problem that I've been trying to solve for several days: I try to select rows from an MS SQL Server via JDBC that contain a certain numeric value at a certain position in a long varchar field.
    I'm using queries like
    select * from table where substring(field_1, 37, 7) like '1011234';Those queries always return an empty ResultSet. If I use the same queries in WinSQL, I get correct results (several rows).
    The application code is working in principle; if I search for a text instead of a numeric value, for example select * from table where substring(field_1, 4, 5) like 'Paper'; , I get a complete ResultSet.
    I've tried many variations (= instead of like, search in the entire field (without substring but with like '%1011234%'), with or without ', and more), but that didn't change anything.
    It's also most probably not caused by the JDBC driver; I have tried JTDS first, and then the MS driver (newest versions) - no difference.
    One idea was that the sort order is not correct, tried some COLLATE settings, but that didn't help so far. In this context I'd like to know how to determine the collation sequence of a certain column.
    Another thing I tried was using CAST, for example SELECT * FROM table WHERE CAST(SUBSTRING(field_1, 37, 7) as bigint) = CAST('1011234' as bigint); or SELECT * FROM table WHERE CAST(SUBSTRING(field_1, 37, 7) as bigint) = CAST(1011234 as bigint);, but that didn't help either.
    Some facts:
    Server: Microsoft SQL Server, version 09.00.2047
    Driver in WinSQL: SQLSRV32.DLL, version 03.85.1117
    JDBC-Driver:
    - JTDS, version 1.2
    - Microsoft SQL Server 2005 JDBC Driver, Version 1.2
    JVM: jre1.5.0_11
    I didn't find anything on Google, or in this forum, or other forums. I really hope someone here can help me. Thanks in advance!
    Best regards,
    Uica

    Your note suggests to me that this is a coding problem, not a JDBC or SQL problem unless you are hitting a bug in the SQL Server JDBC driver. Others may have ideas from what you have written, but I think it would be helpful to see the actual code that you are executing that does not bring back the results that you are expecting (don't forgot to use code tags to format your code correctly).
    It might also be helpful to execute a query (from within your Java code) to ensure that you are connecting to the right database, accessing the correct table and that your substring is using the correct offset. The query would look something like this (and then of course display the list of results):
    SELECT substring(field_1, 37, 7) from table

  • Searching for special symbols

    Is there any way of searching, in Reader XI (using Windows XP, for example), for special characters such as u-unlaut, e-acute, or the math'Scientific symbol 6,29 (a small black upward-pointing triangle)?

    It appears that Reader search is treating accenter characters the same way as un-accented characters; i.e. searching for 'ü' will return the same results as for 'u'.
    I don't know about your mathematical symbol; is that a Unicode character?

Maybe you are looking for

  • IPhone 3G S Nightmare

    Hi everone just wanted to let you know my expierence with ordering the 3GS. So like most of you I was excited to hear about the new iPhone and jumped at the opportunity to have one in my hands come 6/19. My husband and I were upgrading from the origi

  • Can't find drivers WinXP for Satellite 1115-S123

    Hello all, and thx for reading my Thread Here my Problem i have a good old Satellite 1115-S123 Notebook and installed Windows Xp Home Edition SP3 inc. latest Patches. Windows need the Driver for a PCI-Modem and Display Driver for the ATI-Mobility but

  • Downpayment through F110

    Hi, Can some one let me know how to make payment through Automatic Payment Program. Thanks, Rams N

  • Problem with transaction with Entity Beans in R2

    I had a transaction (initiated by a session bean (requires new)) that takes two entity beans (two bank accounts) and trasfer funds from one to another. It looks like the container is waiting for the transaction, i don't know, here comes the exception

  • BPC installation - Setting up for large requests

    Hi, Im about to finish the installation for BPC 7.5 , according to the guide  page 30, the Setting Up for Large Requests part  says: - Edit the metabase.xml file and set the following parameters: ASPBUFFERINGLIMIT MAXREQUESTENTITYALLOWED How can I do