Search case-insensitive.

HI All ,
i want to create program that use search from table but case-insensitive ,
How i can do that ?
Regards
James
    SELECT agr_name UP TO iv_limit ROWS
    FROM ZROLE
    INTO TABLE lt_re_role
    WHERE agr_name LIKE lv_search_value.

Hi,
If the definition is not case sensitive, then always the data is stored in CAPS by default.
So what u can do it, translate your string to UPPER CASE and then select.
Place below statement just before your select.
TRANSLATE lv_search_value TO UPPER CASE.
SELECT agr_name UP TO iv_limit ROWS
FROM ZROLE
INTO TABLE lt_re_role
WHERE agr_name LIKE lv_search_value.
Thanks,
Vinod.

Similar Messages

  • Making ADF Search case insensitive without using Execute with Params??

    I have a ADF search page baed on VO. I'm not Execute with Params form, instead i'm using normal ADF search page. Is it possible to make the search case insensitive?? if yes, how to do that?

    Ok, i'll try to find out the SRDemo application using ADF BC.
    And In Execute with params form,i'm already using UPPER on both the sides of where clause.
    Say my VO query is like
    select <table name>,...
    from fnd_tables t,fnd_applications a
    where a.application_id = t.application_id
    and upper(t.table_name) like upper(:EntityName) || '%'
    Then i created the ADF paramaters form by dragging and dropping the Execute with param from data control pallette.. when i run this page and do the search, it throws the error given in my second update...Any clue why that error is coming?
    Thanks
    Senthil

  • How to search case insensitive ?

    Is there any way to search case insensitive ?
    Because we use Remedy application, we can't change query like to use 'UPPER' or 'LOWER' functions.
    For example,
    SQL> desc test1
    Name Null? Type
    A VARCHAR2(20)
    SQL> select * from test1;
    A
    TEST
    test
    SQL> select * from test1 where A like 'TE%';
    then I expect result as following:
    A
    TEST
    test
    Please advise..

    If you can't change the query or schema then I'm afraid you are pretty much stuck. You can use a function based index if you stop using a wildcard (% forces a full-table scan and, therefore, does not use the index). If you had more control over the app, the context index would be good. Storing the data in all uppercase is another solution. All of the solutions are controled by the app vendor though.
    My advice - log an enhancement with Remedy...suggest using a context index on the column in question.

  • Use of wildcard and case insensitive searches

    Used the "Create form from a table" option. Have a customized form for this table to query, insert, update, and delete rows. My question is how can I allow a user to 1) search using a wildcard (%) from this form and 2) how can I make the search case insensitive for my users.
    Thanks

    Hi,
    Why not create a report to find the records and link to the form from the report.
    You can then set the where clause to be whatever you wish:
    where tablename.columnname like :parameter
    or even:
    where UPPER(tablename.columnname) like UPPER(:parameter)
    Regards Michael

  • Doing case insensitive search

    Is there any performant way to do case insensitive searches within the database other than using upper on the column?
    If I use upper(col name) the index on the column is bypassed and hence this effects performance.
    Is there any other way to do this.
    Thanks
    Vandana

    In 10g rel.2 :
    alter session set nls_comp=linguistic;
    Execute your query; it should work for text search case insensitive
    You can also use regular expression function like regexp_like() with match_option set to ‘i’:
    select ename
    from emp
    where regexp_like(ename, ‘k’, ’i’);
    Best Regards
    Krystian Zieja / mob

  • Implement QBE case insensitive search using model layer?

    Using ADF 11.1.1.6.2
    We know we can set filterFeatures='caseInsensitive' at UI layer to make QBE to search case insensitive.
    How can we push that behavior using model layer implementation?
    Thanks

    Using ADF 11.1.1.6.2
    We know we can set filterFeatures='caseInsensitive' at UI layer to make QBE to search case insensitive.
    How can we push that behavior using model layer implementation?
    Thanks

  • No case insensitive search in RAPID applications

    Hey experts,
    we have created a rapid application with non-key field "description". The rapid application is generating a search criteria "description", so far so good.
    Now the issue is that only case sensitive search is possible for this field.
    Any suggestions how to make the search case insensitive for this field or in general for all text fields?
    Thanks,
    Wladimir

    Hello Wladimir.
    Almost all of case insensitive searches in SAP CRM are done using dedicated "search" field (we're talking about classical DBs and not HANA and its capabilities). Which represents the desired field in uppercase in the same database table. Compare BUT000-NAME_LAST and BUT000-MC_NAME1, ADR6-SMTP_ADDR and ADR6-SMTP_SRCH fields pairs for example. So your description field should be programmatically converted to upper case and stored in another field. On which you should do the search.
    Otherewise you should do a complete scan of database entries and compare pairs converted to the same case.

  • Possible to do case-insensitive searches?

    G'day,
    I was wondering if it's possible to do case-insensitive searches in oracle/HTMLDB?
    I've tried what I thought would work
    "select * from application where name like '%microsoft%'", this unfortunately doesn't return any records with a capital in it(eg "Microsoft").
    If there is no way to do case-insensitive searches what is the best way around it?
    Thanks
    -Colin

    Colin,
    Yes it is possible to do case insensitive searches using SQL. Try, for example:
    select * from application where upper(name) like '%ORACLE%'
    The trick is to upper() both sides of the like operator.
    Sergio

  • Error in a report after enabling case insensitive search in conn pool prop

    Hi All,
    I put the below code in connection pool's connection string to enable case insensitive search.
    alter session set NLS_SORT=BINARY_CI
    alter session set NLS_COMP=LINGUISTIC
    After putting this code one of my report started giving the below error which was working fine otherwise.
    Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P
    State: HY000. Code: 10058. NQODBC SQL_STATE: HY000 nQSError: 10058 A general error has occurred. nQSError: 16001 ODBC error state: S1000 code: 1791 message: OracleODBCOraORA-01791: not a SELECTed expression. nQSError: 16001 ODBC error state: S1000 code: 1791 message: OracleODBCOraORA-01791: not a SELECTed expression. nQSError: 16015 SQL statement execution failed. (HY000)
    The report gives error for the below divide condition when I select a column from a different dimension (eg: region)
    COUNT(DISTINCT RMA.RMA)/COUNT(DISTINCT User."User Name")
    Can anyone please throw a light why this is happening.

    Below is the SQL which is throwing error in OBIEE. It was working fine when I tried running it in toad:
    select T1609.ATTRIB_05 as c1,
    count(distinct T1609.ATTRIB_42) as c2,
    TRUNC(T1159.FSCL_WEEK_START_DT) as c3
    from
    WC_DAY_D T1159 /* RMA_RECEIVED_DT(WC_DAY_D) */ ,
    WC_RMA_D T571,
    WC_FV_FA_D T1609,
    WC_FV_FA_F T1679
    where ( T571.ROW_WID = T1679.RMA_WID and T1159.ROW_WID = T1679.RMA_RECEIVED_WID and T1609.ROW_WID = T1679.FV_FA_WID and T1609.ATTRIB_39 <> 'FV' and (T571.STATUS_CD in ('2nd FA', '2nd FA Review', 'Closed')) and TRUNC(T1609.TODO_ACTL_END_DT) is not null and TRUNC(T1159.FSCL_WEEK_START_DT) between TIMESTAMP '2009-03-22 00:00:00' and TIMESTAMP '2009-04-12 00:00:00' )
    group by T1609.ATTRIB_05, TRUNC(T1159.FSCL_WEEK_START_DT)
    order by c3
    -------------------- Query Status: Query Failed: [nQSError: 16001] ODBC error state: S1000 code: 1791 message: [Oracle][ODBC][Ora]ORA-01791: not a SELECTed expression.
    [nQSError: 16001] ODBC error state: S1000 code: 1791 message: [Oracle][ODBC][Ora]ORA-01791: not a SELECTed expression.
    [nQSError: 16015] SQL statement execution failed.

  • Search for LIFNR case insensitive + range

    Ladies and gentlemen,
    I could use your help. I need to select rows from LFA1 where the name (NAME1) matches a string. It has two difficult points, which I were not able to combine into a single solution, even after all the research I done.
    - I need the search to be case insensitive (I found a partial solution here)
    - I need to combine it with a range table
    So: I need a case insensitive search using range table. Can this be done effectively? Or is there any workaround you could suggest? This is just a minor part of the report about invoices and must not take long.
    Thank you for the time and effort,
    Cheers Otto

    Thank you, guys,
    you are very helpful, your ideas solved my problem. The MCOD* idea is easy/fast and solve my problem very well. I don´t understand why I didn´t find it myself. Hope to pay you back one day:))
    For others interested:
          DATA sx_dodnam TYPE TABLE OF z_dodnam_range.
          DATA wa_dodnam LIKE LINE OF sx_dodnam.
          LOOP AT s_dodnam INTO wa_dodnam.
            TRANSLATE wa_dodnam-low  TO UPPER CASE.
            TRANSLATE wa_dodnam-high TO UPPER CASE.
            APPEND wa_dodnam TO sx_dodnam.
          ENDLOOP.
          SELECT lifnr INTO wa_lifnr-low FROM lfa1 WHERE stcd2 IN s_ico AND mcod1 IN sx_dodnam.
            IF sy-subrc = 0.
              wa_lifnr-sign = 'I'.
              wa_lifnr-option = 'EQ'.
              APPEND wa_lifnr TO lt_lifnr.
            ENDIF.
          ENDSELECT.
    Cheers Otto

  • Case insensitive quick search of UCM

    'Quick Search' in UCM looks case sensitive. If I create a file with title as 'Test File' it shows result in following cases
    Test
    Test File
    But it can't show result when I search for
    test
    test file
    Is there a way to make it case insensitive search?
    Thanks
    Sanjeev

    Hi,
    Already answered in the following thread :https://forums.oracle.com/thread/2193824
    Romain.

  • Case sensitive and case insensitive Search

    Hi friends,
         Iam doing an Search RFC which will search records based on the search parameters provided at the portal side.
    One of the search parameter is a field with 40 character which holds the description(title) of the record.
    With this search paramter iam facing case sensitive problem.
    Example:
    Values in Database Table: ( Can be in any case)
           Record 1:  Sensitive
           Record 2:  SENSITIVE
           Record 3:  SensTive
           Record 4:  sensitive
           Record 5:  sensTive
         Input to RFC:  sens*
         Output: Getting only 4rth and 5th record but not all the records.
           The same is the case with the remaining search parameters(Like user name..).
           Is there any way of getting all the records when searching from the data base (with case insensitive).
           Kindly let me know if there is any possibility.
    Thanks in advance.
    Regards,
    Swarna Munukoti.

    Generally, no.  So, you'll either have to use EXEC SQL, or add more fields to the table.  You can do this using APPEND structures, which is the SAP approved way of adding fields.  If there are suitable user exits in the standard SAP code, then you'll be able to populate the additional fields there, as new records are created, or amended.
    Alternatively, create your own Z table with the same key as the standard table and a "search field" which contains the uppercase version of the field you're wanting to search.  You can either, again populate in suitable user exits, or, in worst case, have job that runs regularly populating your Z table.
    matt

  • Case insensitive search and index

    I have to execute a case insentitive search.
    I created this index on a not null field:
    create index indx_prova on
    table (nlssort(campo, 'NLS_SORT=BINARY_CI'));
    The select is:
    select * from tabella where campo like 'A storage%'
    This select should retrive 5 records:
    A storage ring for crystalline beam studies
    a storage ring for crystalline beam studies
    A Storage Ring for Crystalline Beam Studies
    A storage ring for crystalline beam studies
    A storage ring for crystalline beam studies
    Instead I got only 3 records:
    A storage ring for crystalline beam studies
    A storage ring for crystalline beam studies
    A storage ring for crystalline beam studies
    So The query isn't case insensitive.
    I can't set nls_sort=BINARY_CI and nls_comp=LINGUISTIC at level session.
    Is there a solution.
    Am I doing something wrog?

    I set alter session set nls_comp=LINGUISTIC; alter session set nls_sort=BINARY_CI;
    I create this index:
    create index titolo_indx on
    table (nlssort(campo, 'NLS_SORT=BINARY_CI'));
    If I execute this query:
    select * from ri01_prodotti where titolo like 'A storage ring f%'
    Oracle doesn't user the index.
    SQL_ID 7yvspnyf96vp8, child number 0
    select * from ri01_prodotti where titolo like 'A storage ring%'
    Plan hash value: 350479533
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
    | 0 | SELECT STATEMENT | | | | 2020 (100)| |
    |* 1 | TABLE ACCESS FULL| TABLE | 1 | 1365 | 2020 (1)| 00:00:25 |
    Predicate Information (identified by operation id):
    1 - filter("CAMPO" LIKE 'A storage ring%')
    If I execute a query with =, oracle use index.
    select * from table where campo ='A storage ring for crystalline beam studies'
    SQL_ID 5jzr5nm6b37pq, child number 0
    select * from ri01_prodotti where titolo ='A storage ring for crystalline beam
    studies'
    Plan hash value: 3866031381
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
    | 0 | SELECT STATEMENT | | | | 151 (100)| |
    | 1 | TABLE ACCESS BY INDEX ROWID| RI01_PRODOTTI | 377 | 502K| 151 (0)| 00:00:02 |
    |* 2 | INDEX RANGE SCAN | TITOLO_INDX | 151 | | 3 (0)| 00:00:01 |
    Predicate Information (identified by operation id):
    2 - access("RI01_PRODOTTI"."SYS_NC00078$"=HEXTORAW('612073746F726167652072696E6720
    666F72206372797374616C6C696E65206265616D207374756469657300') )

  • Case insensitive search in select statement

    Hi Experts,
      I have entries in table as mixed case. For example i am searching on an attribute called description in the table. I want the serch to be case insensitive for that attribute. Because in table it is i.e. JUMBO Pack and in the search attribute it is i.e. Jumbo Pack.
    I do not want to translate both to the same case and search. Is there an option?
    Best Regards!
    Sandip

    Hi Sandip,
    One more alternative:
    If ztext is ur original field which is saving the mixed text.
    Append one extra field(ztext_upper) to the table.
    Now if " Sap Sdn" is the text we are saving then
    While saving the entires to the table,
    1. asusual save the value(" Sap Sdn") to teh original field(ztext)
    2. translate the value to upper case(SAP SDN) and save this entry to teh newly appended field(ztext_upper)
    Now while doing search, translate to upper case and compare with the value in ztext_upper. If it satisfies then for display options select the original value from the field (ztext) which is corresponding to the satisfied ztext_upper field.
    Regards,
    Swarna Munukoti.

  • Case Insensitive Search coupled with "LIKE" operator.

    Greetings All, I am running Oracle 11gR1 RAC patchet 25 on Windows X64.
    This db supports and application that requires case insensitive searches.
    Because there are a few entry points into the db I created an "after login" trigger:
    CREATE OR REPLACE TRIGGER MyAppAfterLogon_TRGR
    AFTER LOGON
    ON DATABASE
    DECLARE
    vDDL VARCHAR2(200) := 'alter session set nls_comp=''linguistic''';
    vDDL2 VARCHAR2(200) := 'alter session set nls_sort=''binary_ci''';
    BEGIN
    IF ((USER = 'MyAppUSER') OR(USER = 'MyAppREPORTINGUSER')) THEN
    EXECUTE IMMEDIATE vDDL;
    EXECUTE IMMEDIATE vDDL2;
    END IF;
    END MyAppAfterLogon_TRGR;
    This ensures that everyone connecting to the DB via any mechanism will automatically have case insensitive searches.
    Now, to optimize the know queries I created the standard index to support normal matching queries:
    select * from MyTable where Name = 'STEVE';
    The index looks like:
    CREATE INDEX "CONTACT_IDX3 ON MYTABLE (NLSSORT("NAME",'nls_sort=''BINARY_CI'''))
    This all works fine, no issues.
    The problem is when I write a query that uses the "LIKE" operator:
    select * from MyTable where Name like 'STEV%';
    I get back the record set I expect. However, my index is not used? I can't for the life of me get this query to use an index.
    The table has about 600,000 rows and I have run gather schema stats.
    Does anyone know of any issues with case insensitive searches and the "LIKE" clause?
    Any and all help would be appreciated.
    L

    I think there is issue with your logon trigger :
    "IF ((USER = 'MyAppUSER') OR(USER = 'MyAppREPORTINGUSER')) THEN"
    it should be :
    IF UPPER(USER) = 'MYAPPUSER' OR UPPER(USER) = 'MYAPPREPORTINGUSER' THEN
    because user name stored in Upper case. Check and try.
    HTH
    Girish Sharma

Maybe you are looking for

  • SSO Partner Application not working

    Hi, I have OBIEE running on a different box. I need to enable SSO for OBIEE. I deployed the analytics.war file in the home oc4j container of Oracle Portal and manually registered it as a Partner Application, made following changes in mod_osso.conf in

  • How to configure the jms adapter

    hi all,        i got some trouble trying to configure de JMS adapter, i 'd be glad if some colud give me a hand with this. i'am wordering if there is a complete document about this topic to help me out with de configuration. thk u all very much. Rega

  • HT204266 Too many http redirects

    When I click on the App Store icon, I get a message "too many http redirects." When I click "ok" the app shuts off

  • Droid Razr M Problems

    I have had my droid razr m since february of this year and have had no problems. Today however, i turned on my phone and it started to update some apps due to me still being connected to the wifi at my house. I tried to stop the updates to help save

  • Confused with regual expressions

    Hi all, Many many thanks for your help so far. This is one more question I am trying to contruct a regula expression that will remove from a text inpu ttwo characters: a) any panctuation (? commas, etc) b) remove any white space at the end of the lin