Ask a Question related to Coldfusion Database Access, Design and Development.

  1. #1

    Default Oracle and Case

    Hi all,

    When working with a Oracle DB how can we search for phrases or strings case
    insensitive? Should we just store all text in upper or lower cases in the DB?
    If so then a problem arises that text is not entered exactly as the user wanted.

    As an example: One would use a Content Management System and User would enter
    his text for the website. Then pulling that text would show all in upper or
    lower case when retrieving from the db, no? What about searching? I mean we
    cant force our customers to only search in lower case.

    How does anybody overcome this?

    TIA for any advices.

    Nitai

    nitai_co Guest

  2. Similar Questions and Discussions

    1. [Macromedia][Oracle JDBC Driver][Oracle]ORA-01000:maximum open cursors exceeded
      Here is the technote from Macromedia regarding this issue: http://www.macromedia.com/go/tn_17660 Hope this helps!
    2. How to make Oracle case insensitive
      Dear Gurus, Could any one tell me if there is an option in Oracle to make Database case insensitive, like SQL Server. Thanks in advance ...
    3. #13053 [Com]: oci8 error, this kill oracle-prosseces in the oracle-instance.
      ID: 13053 Comment by: gid at gifpaste dot net Reported By: jsun at basefarm dot no Status: Bogus Bug Type: ...
    4. #23026 [Com]: Make Zend case-sensitive (classes, functions, remove case-insensitive)
      ID: 23026 Comment by: nvivo at mandic dot com dot br Reported By: mfischer@php.net Status: Open Bug Type: ...
    5. New 'Oracle Express / Oracle 9i OLAP' White Paper Available For Download
      Plus Consultancy (http://www.plusconsultancy.co.uk) recently presented a white paper entitled "Express Evolution - What Oracle 9i OLAP Offers The...
  3. #2

    Default Re: Oracle and Case

    I don't use oracle, but I've seen other posts where the developer just converted all terms to the same case.

    WHERE LOWER(someColumn) = '#LCase(form.someField)#'
    mxstu Guest

  4. #3

    Default Re: Oracle and Case

    I see.

    So actually one stores the entries of the Users "as is" and then converts
    search inputs to upp/lower cases and then also converts the data in the db to
    upper/lower case to compare on the fly.

    Looks to me like a little bit of a overkill. Anyhow, what would be better to
    convert to upper or lower case? Guess that doesn't matter?




    nitai_co Guest

  5. #4

    Default Re: Oracle and Case

    If you import the data "as is", then It's not overkill, it won't work otherwise.

    I think upper vs lower matters.


    mxstu Guest

  6. #5

    Default Re: Oracle and Case

    Sorry, I meant to write that I think it is a overkill to convert the data
    before searching within the where of the query.

    I read on the Oracle Technote that one should not use upper() or lower() a lot
    because of the performance hit on the database. But I guess one can overcome
    the case problem with a index which then again is caseinsensitive. Since I am
    searching only a field with short values, for me a index would be too much.

    About upper/lower case. I have read that a lot of developers prefer uppercase,
    but I have yet to see any reasons for it.


    nitai_co Guest

  7. #6

    Default Re: Oracle and Case

    >I read on the Oracle Technote that one should not use upper() or lower() a lot
    because of the performance hit on the >database. But I guess one can overcome
    the case problem with a index which then again is caseinsensitive. Since I am
    >searching only a field with short values, for me a index would be too much.
    Yes, there is definitely a performance hit when using functions. As far as
    the indexes I guess it depends on the database. It used to be that using
    functions could sometimes cause the database to ignore an indexes completely.
    However, I think the behavior depends on the database type. I'm not sure how
    oracle handles it.
    >About upper/lower case. I have read that a lot of developers prefer
    uppercase, but I have yet to see any reasons for it.
    Yes, I seem to remember that from years ago. I don't recall the reason either.

    What version of oracle are you using? I take it that it is not one of the
    newer ones that has case insensitive settings?




    mxstu Guest

  8. #7

    Default Re: Oracle and Case

    >I think upper vs lower matters.
    That should be I do *not* think it matters. My typing is awful today ;-)
    mxstu Guest

  9. #8

    Default Re: Oracle and Case

    We are using 10g. What caseinsensitive switch? I found nothing in the documentations?

    nitai_co Guest

  10. #9

    Default Re: Oracle and Case

    Have you thought about Oracle Text? If you're doing a CMS, that might be appropriate.

    JR


    jonwrob Guest

  11. #10

    Default Re: Oracle and Case

    I don't think it has a global switch per se, like ms sql. I was thinking of [url]http://www.oracle.com/technology/oramag/oracle/03-sep/o53sql.html[/url].


    mxstu Guest

  12. #11

    Default Re: Oracle and Case

    Have you thought about Oracle Text?

    We are rather new to Oracle. I have read about Oracle Text but actually dont know how to use it. Do you mabye have a snippet?

    TIA
    nitai_co Guest

  13. #12

    Default Re: Oracle and Case

    It's all in the manuals. Specifically, look at the Oracle Text Application Developers Guide. Read it, experiment and have fun.

    JR
    jonwrob Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139