Case INSENSITIVE Columns on Oracle

Hello Friends,
Good Monday for everyone....
I would like to ask you guys if there is a way to create a case INSENSITIVE Columns on Oracle. I used on Sqlserver before the COLLATE sintax, and I was able to make a columns (just that one) INSENSITIVE.
I'm using oracle 10gr2 on Windows plataform and herte is my nls_parameters. My ideia is to search on this column without the need of performing a function UPPER and LOWER and etc...
NLS_LANGUAGE BRAZILIAN PORTUGUESE
NLS_TERRITORY BRAZIL
NLS_CURRENCY Cr$
NLS_ISO_CURRENCY BRAZIL
NLS_NUMERIC_CHARACTERS ,.
NLS_CALENDAR GREGORIAN
NLS_DATE_FORMAT DD/MM/RR
NLS_DATE_LANGUAGE BRAZILIAN PORTUGUESE
NLS_CHARACTERSET WE8MSWIN1252
NLS_SORT WEST_EUROPEAN
NLS_TIME_FORMAT HH24:MI:SSXFF
NLS_TIMESTAMP_FORMAT DD/MM/RR HH24:MI:SSXFF
NLS_TIME_TZ_FORMAT HH24:MI:SSXFF TZR
NLS_TIMESTAMP_TZ_FORMAT DD/MM/RR HH24:MI:SSXFF TZR
NLS_DUAL_CURRENCY Cr$
NLS_NCHAR_CHARACTERSET AL16UTF16
NLS_COMP BINARY
NLS_LENGTH_SEMANTICS BYTE
NLS_NCHAR_CONV_EXCP FALSE
tks a lot
Keen

APC wrote:
No, they mean a setting which makes "APC" or "apc" match "Apc".
There is nothing to be done on 10g, other than building a function based index on the column in question, so that any UPPER() searches are optimized.
Well, as Kamran Agayev already noted CI is available in 10g too. It also worth mentioning FBI creates a hidden column. Also, your statement
In 11g we have the option to set the NLS_SORT parameter so that any searches are case-insensitive (or indeed accent insensitive). Find out more.
is incomplete. NLS_SORT affects nothing but sort:
SQL> connect scott
Enter password: *****
Connected.
SQL> select * from v$version
  2  /
BANNER
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Prod
PL/SQL Release 10.2.0.4.0 - Production
CORE    10.2.0.4.0      Production
TNS for 32-bit Windows: Version 10.2.0.4.0 - Production
NLSRTL Version 10.2.0.4.0 - Production
SQL> with t as (
  2             select 'Max' name from dual union all
  3             select 'sam' name from dual union all
  4             select 'Joe' name from dual union all
  5             select 'max' name from dual union all
  6             select 'joe' name from dual union all
  7             select 'Sam' name from dual
  8            )
  9  select  name
10    from  t
11    order by name
12  /
NAM
Joe
Max
Sam
joe
max
sam
6 rows selected.
SQL> with t as (
  2             select 'Max' name from dual union all
  3             select 'sam' name from dual union all
  4             select 'Joe' name from dual union all
  5             select 'max' name from dual union all
  6             select 'joe' name from dual union all
  7             select 'Sam' name from dual
  8            )
  9  select  name
10    from  t
11    where name = 'max'
12  /
NAM
max
SQL> alter session set nls_sort = binary_ci
  2  /
Session altered.
SQL> with t as (
  2             select 'Max' name from dual union all
  3             select 'sam' name from dual union all
  4             select 'Joe' name from dual union all
  5             select 'max' name from dual union all
  6             select 'joe' name from dual union all
  7             select 'Sam' name from dual
  8            )
  9  select  name
10    from  t
11    order by name
12  /
NAM
Joe
joe
max
Max
Sam
sam
6 rows selected.
SQL> with t as (
  2             select 'Max' name from dual union all
  3             select 'sam' name from dual union all
  4             select 'Joe' name from dual union all
  5             select 'max' name from dual union all
  6             select 'joe' name from dual union all
  7             select 'Sam' name from dual
  8            )
  9  select  name
10    from  t
11    where name = 'max'
12  /
NAM
max
SQL> with t as (
  2             select 'Max' name from dual union all
  3             select 'sam' name from dual union all
  4             select 'Joe' name from dual union all
  5             select 'max' name from dual union all
  6             select 'joe' name from dual union all
  7             select 'Sam' name from dual
  8            )
  9  select  name
10    from  t
11    where name like 'm%'
12  /
NAM
max
SQL> select 'Max' name from dual union
  2  select 'max' name from dual
  3  /
NAM
Max
max
SQL> with t as (
  2             select 'Max' name from dual union all
  3             select 'sam' name from dual union all
  4             select 'Joe' name from dual union all
  5             select 'max' name from dual union all
  6             select 'joe' name from dual union all
  7             select 'Sam' name from dual
  8            )
  9  select  distinct name
10    from  t
11  /
NAM
sam
Joe
joe
max
Sam
Max
6 rows selected.
SQL> As you can see, NLS_SORT alone works on sort but not on "searches". We also need to set NLS_COMP, which by default is BINARY. Prior to 10g R2 (I am not 100% sure, it could be prior 10g), the only NLS_COMP choice, besides BINARY, was ANSI. However, ANSI does not work with all comparison operators (e.g. does not work for LIKE, UNION, DISTINCT):
SQL> alter session set nls_sort = binary_ci
  2  /
Session altered.
SQL> alter session set nls_comp=ansi
  2  /
Session altered.
SQL> with t as (
  2             select 'Max' name from dual union all
  3             select 'sam' name from dual union all
  4             select 'Joe' name from dual union all
  5             select 'max' name from dual union all
  6             select 'joe' name from dual union all
  7             select 'Sam' name from dual
  8            )
  9  select  name
10    from  t
11    order by name
12  /
NAM
Joe
joe
max
Max
Sam
sam
6 rows selected.
SQL> with t as (
  2             select 'Max' name from dual union all
  3             select 'sam' name from dual union all
  4             select 'Joe' name from dual union all
  5             select 'max' name from dual union all
  6             select 'joe' name from dual union all
  7             select 'Sam' name from dual
  8            )
  9  select  name
10    from  t
11    where name = 'max'
12  /
NAM
Max
max
SQL> with t as (
  2             select 'Max' name from dual union all
  3             select 'sam' name from dual union all
  4             select 'Joe' name from dual union all
  5             select 'max' name from dual union all
  6             select 'joe' name from dual union all
  7             select 'Sam' name from dual
  8            )
  9  select  name
10    from  t
11    where name like 'm%'
12  /
NAM
max
SQL> select 'Max' name from dual union
  2  select 'max' name from dual
  3  /
NAM
Max
max
SQL> with t as (
  2             select 'Max' name from dual union all
  3             select 'sam' name from dual union all
  4             select 'Joe' name from dual union all
  5             select 'max' name from dual union all
  6             select 'joe' name from dual union all
  7             select 'Sam' name from dual
  8            )
  9  select  distinct name
10    from  t
11  /
NAM
sam
Joe
joe
max
Sam
Max
6 rows selected.
SQL> Starting 10g R2 NLS_COMP can be set to LINGUISTIC, which will also work for LIKE and UNION but not for DISTINCT:
SQL> alter session set nls_sort = binary_ci
  2  /
Session altered.
SQL> alter session set nls_comp=linguistic
  2  /
Session altered.
SQL> with t as (
  2             select 'Max' name from dual union all
  3             select 'sam' name from dual union all
  4             select 'Joe' name from dual union all
  5             select 'max' name from dual union all
  6             select 'joe' name from dual union all
  7             select 'Sam' name from dual
  8            )
  9  select  name
10    from  t
11    order by name
12  /
NAM
Joe
joe
max
Max
Sam
sam
6 rows selected.
SQL> with t as (
  2             select 'Max' name from dual union all
  3             select 'sam' name from dual union all
  4             select 'Joe' name from dual union all
  5             select 'max' name from dual union all
  6             select 'joe' name from dual union all
  7             select 'Sam' name from dual
  8            )
  9  select  name
10    from  t
11    where name = 'max'
12  /
NAM
Max
max
SQL> with t as (
  2             select 'Max' name from dual union all
  3             select 'sam' name from dual union all
  4             select 'Joe' name from dual union all
  5             select 'max' name from dual union all
  6             select 'joe' name from dual union all
  7             select 'Sam' name from dual
  8            )
  9  select  name
10    from  t
11    where name like 'm%'
12  /
NAM
Max
max
SQL> select 'Max' name from dual union
  2  select 'max' name from dual
  3  /
NAM
Max
SQL> with t as (
  2             select 'Max' name from dual union all
  3             select 'sam' name from dual union all
  4             select 'Joe' name from dual union all
  5             select 'max' name from dual union all
  6             select 'joe' name from dual union all
  7             select 'Sam' name from dual
  8            )
  9  select  distinct name
10    from  t
11  /
NAM
sam
Joe
joe
max
Sam
Max
6 rows selected.
SQL> However even LINGUISTIC does not work with:
• CLOB or NCLOB data types
• Object data types
• Table partitions
• Index-organized tables
SY.

Similar Messages

  • Case Insensitive Comparison in Oracle 9i

    hi all
    in Oracle 10g we have the following statement to enable case-INsensitive comparison:
    ALTER SESSION SET nls_sort=binary_ai
    do we have somthing like this in Oracle 9i to enable case-INsensitive comparison
    thnx
    Ashu :)

    Connected to:
    Oracle9i Enterprise Edition Release 9.2.0.7.0 - 64bit Production
    JServer Release 9.2.0.7.0 - Production
    SQL> create table t as select 'télé' t from dual
    union select 'TÉLÉ' from dual
    union select 'tele' from dual
    union select 'TELE' from dual
    union select 'Bebe' from dual;
    Table created.
    SQL> alter session set nls_comp=ansi;
    Session altered.
    SQL> ALTER SESSION SET NLS_SORT=GENERIC_BASELETTER;
    Session altered.
    SQL> select * from t where t='tele';
    T
    TELE
    TÉLÉ
    tele
    télé

  • Phonetic and case insensitive searches in Oracle

    Hi,
    Do you know if Oracle 9i allows phonetic searches ? I've found several solutions for case insensitive searches, but I'd need phonetic searches too (like 'había' vs. 'havia' vs. 'habia', etc)
    Any comment would be really welcome.
    Thanks in advance,
    Juan

    lookup soundex in the SQL Reference guide.

  • 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

  • Blank padding in case of nchar columns while case insensitive comparison

    hi
    i have my database on oracle 9i .
    i want case insensitive behaviour so i set nls_comp=ANSi and nls_sort to GENERIC_BASELETTER.
    all columns of type character are nchar in my database.
    but when i execute a query having a where condition on nchar column blanks are not padded and there is no result ( documentation says lanks are padded while comparisons)..
    for e.g select * from area where code='bom' does not return result.
    i need to do select * from area where rtrim(code) = 'bom'. (note code is of length nchar(10))
    please suggest if here is any solutions for this.

    It's always helpful when you have problems if you can provide a concrete example of those problems. For example can you provide something like the following the exhibits the problem?
    SQL> SELECT * FROM V$VERSION;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
    PL/SQL Release 10.2.0.4.0 - Production
    CORE    10.2.0.4.0      Production
    TNS for 64-bit Windows: Version 10.2.0.4.0 - Production
    NLSRTL Version 10.2.0.4.0 - Production
    SQL> CREATE TABLE AREA(CODE NCHAR(10));
    Table created.
    SQL> INSERT INTO AREA VALUES ('bom       ');
    1 row created.
    SQL> SELECT * FROM AREA WHERE CODE = 'bom';
    CODE
    bom
    SQL> SHOW PARAMETER NLS_COMP
    NAME                                 TYPE        VALUE
    nls_comp                             string
    SQL> SHOW PARAMETER NLS_SORT
    NAME                                 TYPE        VALUE
    nls_sort                             string
    SQL> ALTER SESSION SET NLS_COMP=ANSI;
    Session altered.
    SQL> ALTER SESSION SET NLS_SORT=GENERIC_BASELETTER;
    Session altered.
    SQL> SELECT * FROM AREA WHERE CODE = 'bom';
    CODE
    bom

  • Intermittent oracle errors with case-insensitive searches

    Hi
    I have a table with several columns, two of them are indexed with oracle text.
    When I ask queries containing "CONTAINS"-clauses against these columns everything works great. However I have a few other columns in table that I want to run case-insensitive comparisons with.
    So I enable case-insensitivity:
    ALTER SESSION SET NLS_COMP=LINGUISTIC
    ALTER SESSION SET NLS_SORT=BINARY_CI
    Now I suddenly start getting intermittent errors.
    When I call a query:
    SELECT
    FROM
    article_table at
    WHERE
    CONTAINS(searchfield , '%MEAT%') > 0
    Sometimes it works, but sometimes I get:
    ERROR
    ORA-29902: ett fel inträffade när rutinen ODCIIndexStart() kördes
    ORA-20000: Oracle Text error:
    DRG-00100: internal error, arguments : [50935],[drpn.c],[1051],[],[]
    DRG-00100: internal error, arguments : [50935],[drpnw.c],[601],[],[]
    DRG-00100: internal error, arguments : [51002],[drwa.c],[594],[],[]
    DRG-00100: internal error, arguments : [51028],[drwaw.c],[297],[0],[%MEAT%]
    DRG-00100: internal error, arguments : [50401],[dreb.c],[1033],[],[]
    ORA-00600: intern felkod, argument: [qernsRowP], [1], [], [], [], [], [], []
    Anyone knows what is going on? Is this bug? Is there a fox for it?
    Thanks for any help anyone can provide.
    /Kjell

    Clearly that's a bug. Unless anyone here recognizes it and can point you to the bug/patch number I would strongly recomend you to take it to oracle support.
    Incidently, doing a search for '%MEAT%' is usually a bad idea. Leading wildcards will disable the use of the index on the $I table, so unless you're using the SUBSTRING_INDEX option such searches will usually perform very badly. They shouldn't cause "internal errors", of course.

  • How to make a sortable column in a table to do a case insensitive sort ?

    Hi :
    I am using Jdeveloper Studio Edition Version 11.1.1.1.0 and my table columns are sortable but i want to make sure that it case insensitive sort ,for example if i have following column values :
    abc,def,ABC,ghi
    Sorted results should not be likes this : abc,def,ghi,ABC
    instead of this it should be like this : abc,ABC,def,ghi
    Please let me know more about it.
    Thanks
    AN

    Dear,
    I'm using the same configuration, Could u tell me how did u done the sort in a column in any case.
    Regards,
    RengarajR
    Edited by: Rengaraj Rengasamy on Oct 19, 2009 1:34 AM

  • Make oracle database case insensitive

    Hi All,
    I am using oracle 10g EE as my back end database and front end is in C# .NET. I want to make my oracle database to perform any comparison case insensitively. I searched on the net and found several ways to achieve that
    1. using upper function in procedures - can't afford
    2. function index - can't afford
    3. setting the session parameters
    ALTER SESSION SET NLS_COMP=ANSI;
    ALTER SESSION SET NLS_SORT=BINARY_CI;
    The 3rd looks promising and can save lot of time. I have several question
    1. Is there any way I can set these parameters from .NET?
    2. Is there any way I can set once and will make only my database case insensitive?
    any link, reference is highly appreciated.
    Thanks,

    user10768079 wrote:
    Thanks for your mail.
    I want to apply these settings to my oracle database only. It should not affect other oracle database that exist with my db.
    Thanks,It would make sense to issue "ALTER SESSION" statements during logon process from the .NET code instead of changing the entire database - which might affect other users. Judging by the way you have written this, I feel you are referring to a schema rather than database.
    .NET surely has the capability to run "ALTER SESSION" statements.

  • Set Oracle case Insensitive?

    Hi All,
    Is there any way I can make Oracle 10g Case Insensitive. I tried searching and found this link, but I didn't got my answer as http://www.dba-oracle.com/t_case_insensitive_indexes_searches.htm is not working.
    case insensitive
    Thanks,
    Danish

    Is there any way I can make Oracle 10g Case Insensitive.For all the database ? I'm really not convinced that's a good idea, on query level it looks better.
    Anyway, here below an example :
    Re: case sensitivity
    Nicolas.

  • Case insensitive search and replace using ASP and Oracle database

    I am interested in providing a case insensitive search and replace query in a Active server page. At present data is collected from a html form which passes the text values to a ASP page. The ASP page runs a search (select query) to find if the data is already in the Oracle database, if it isn't the ASP page runs sql (INSERT) to insert the record, if not the page returns a form indicating that the record already exists. At present we can convert the case of new records using the VB UCase() function. But can't do a insensitive search with the existing records. *The Query must be able to utilize ASP variables.
    Any help would be much appreciated.
    David Cheryk
    null

    I can't check your script right now since I'm not on Mac. I recommend you to use FindChangeByList script for CS4 instead (it works with CS3): http://forums.adobe.com/servlet/JiveServlet/download/2080627-12695/FindChangeByListCS4.zip together with Martin Fisher's: http://www.kasyan.ho.com.ua/downloads/RecordFindChange_CS3_Kas.zip
    Use this script to record settings from Text and GREP tabs, then copy and paste them into FindChandgeList.txt file.
    Or, optionally you can use this script: http://www.kasyan.ho.com.ua/find_change_by_queries.html.
    Kasyan

  • Oracle Case insensitivity problem

    Hi
    To alter my session to make case insensitive I've set session variables as follows,
    NLS_SORT------>BINARY_CI
    NLS_COMP------>LINGUISTIC
    Now when I ran the following query I'm getting error ORA-00600.
    select * from (select customer_id ,row_number() over (order by customer_id) from customer where customer_name like 's%')
    when I change the query as follows I'm getting the results,
    select * from (select customer_id from (select customer_id from customer where customer_name like 's%'))
    As per my observation if I use either ROW_NUMBER() or ROWNUM in the inner query I'm getting the mentioned exception.
    How to avoid this exception, as I require ROW_NUMBER() in the inner query to restrict the no.of case insensitive records dynamically.
    regards,
    harry

    harrry wrote:
    Hi
    To alter my session to make case insensitive I've set session variables as follows,
    NLS_SORT------>BINARY_CI
    NLS_COMP------>LINGUISTIC
    Now when I ran the following query I'm getting error ORA-00600.ORA-00600 = open an SR with Oracle Support or use the ora-0600 lookup tool on MetaLink.
    select * from (select customer_id ,row_number() over (order by customer_id) from customer where customer_name like 's%')
    when I change the query as follows I'm getting the results,
    select * from (select customer_id from (select customer_id from customer where customer_name like 's%'))
    As per my observation if I use either ROW_NUMBER() or ROWNUM in the inner query I'm getting the mentioned exception.
    How to avoid this exception, as I require ROW_NUMBER() in the inner query to restrict the no.of case insensitive records dynamically.
    regards,
    harry

  • Sorting Column - Case Insensitive but Lower should be first

    Hi all,
    Lets assume we have am EMployee table :
    create table Emp (Empname varchar2(20));
    It has following records :
    Insert into EMP (EMPNAME) values ('A');
    Insert into EMP (EMPNAME) values ('a');
    Insert into EMP (EMPNAME) values ('b');
    Insert into EMP (EMPNAME) values ('c');
    Insert into EMP (EMPNAME) values ('D');
    Insert into EMP (EMPNAME) values ('e');
    Insert into EMP (EMPNAME) values ('E');
    Insert into EMP (EMPNAME) values ('F');
    i.e
    Empname
    A
    a
    b
    c
    D
    e
    E
    F
    I need output as below : ( Sort by Ascending, case insensitive meaning I don't want all Capital first and then Lower letters. The results should be in alphabetical order it shouldn't matter whether its capital or small. More important is that small letter should come first then the Capital letter). Is this possible?.
    Empname
    a
    A
    b
    c
    D
    e
    E
    F
    Select * from emp order by Lower(empname) Asc;
    Doesn't do the job, because 'A' comes before 'a'.
    Regards,
    Bhaskar

    select empname from emp order by upper(empname),ascii(empname) desc;
    EMPNAME
    a
    A
    b
    c
    D
    e
    E
    F
    Cheers,
    Manik.

  • 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.

  • Case insensitive search working in dev but not in prod

    Hello All,
    I had set the CASE_SENSITIVE_CHARACTER_COMPARISON parameter as OFF in NQSConfig.ini file for enabling the case insensitive search in OBIEE.
    This setup is letting me do the case insensitive search in Dev env but the same doesnt work in prod env. I tried pointing both prod and dev rpd to same prod db.
    With same db also, case insensitive search doesnt work in prod env.
    Any idea for which other configuration I can look for.
    Thanks in advance.

    Thanks Stijin. I had seen this post earlier. Case insensitive search works fine after setting the value for NLS_SORT and NLS_COMP in production RPD but the other report with distinct clause starts failing. Not sure about the reason.
    Saw this comment from you in that post:
    The only compromise solution we could find was to "cache" the column value we wanted to use in insensitive searches. These were mainly used in "show all choices" while setting prompts. Other than that there isn't much you can do in an Oracle database.
    Can you please tell me how to implement the above.

  • How to serch a character string in a BLOB (case insensitive)

    Hi
    Could somebody help me with this please.
    I need to search for the existance of a character string in a BLOB column of a table.
    I can do it in the below way.
    PROCEDURE search (in_search VARCHAR2) IS
    lob_doc BLOB;
    Pattern VARCHAR2(30);
    Position INTEGER := 0;
    Offset INTEGER := 1;
    Occurrence INTEGER := 1;
    BEGIN
    Pattern := utl_raw.cast_to_raw(in_search);
    SELECT BLOB_CONTENT INTO lob_doc
    FROM documents WHERE ein = '702265981';
    DBMS_LOB.OPEN (lob_doc, DBMS_LOB.LOB_READONLY);
    Position := DBMS_LOB.INSTR(lob_doc, Pattern, Offset, Occurrence);
    IF Position = 0 THEN
    DBMS_OUTPUT.PUT_LINE('Pattern not found');
    ELSE
    DBMS_OUTPUT.PUT_LINE('The pattern occurs at '|| position);
    END IF;
    DBMS_LOB.CLOSE (lob_doc);
    END search;
    But the problem is, it does a case sensitive search.
    I need a case-insensitive search
    Thanks in Advance

    The best way would be to use Oracle Text.
    However, if you want a quick and dirty solution, I would convert to CLOB, and (assuming 9i) you can use LOWER on the CLOB.
    Click on this link for a blob_to_clob function.
    Re: BLOB to CLOB?

Maybe you are looking for

  • Inventory report for the selection of requisitioner and MRP controller

    Hello Experts,                        Can someone please help me with a standard  Inventory report in which we can give input thr requistioner and MRP controller regards, YK

  • Error CX_SY_CONVERSION_NO_DATE_TIME with value 99991231 when calling a WS

    I'm calling a Web Service in a SAP system from an external program which is written in Java. I got exception CX_SY_CONVERSION_NO_DATE_TIME when I tried to pass value 99991231 to a date field Bapie1Maw1Rt-ListStTo. Do you know other workarounds for th

  • Hotmail will not load in Firefox.

    I was able to access my Hotmail briefly this morning, then it stopped letting me access anything. I can see my folders, but I can't get in to them. I can see when I have new e-mail. but I can't open any of it. Hotmail works fine in Internet Explorer.

  • Quick time error -8971

    I just received a video from a friend in a mpg4 format. I have WXP Home and Quick time version 6.5.02. When I try to open this file I receive an error message: the file cannot be opened quick time does not recognize it. The error is -8971 I believe t

  • Copy control for sale office in delivery

    Hi, In our delivery note the field sale office is blank... we need that this field will be filled by copy control or user exit from document sale (order sale)... always the deliveries are for the same sales office. Any clues for achiving this? Best R