Re: Case insensitive query.

From: Jacob Love <jlove_at_engin.umich.edu>
Date: 1995/10/05
Message-ID: <44v9pl$16l_at_srvr1.engin.umich.edu>#1/1


In article <44s40t$lg8_at_newshost.lanl.gov>, McGrath Glenda <glenda_at_beta.cc.ukans.edu> wrote:
>Try:
>
> SELECT *
> FROM table
> WHERE lower(col1) like 'toys%'
>
>or to be even more sure it will work try:
>
> SELECT *
> FROM table
> WHERE lower(col1) like lower('toys%')
>
>glenda_at_lanl.gov

I agree with choice (b) and would note that it works as well with "upper". These techniques are preferred because they should work in any implementation; however, if you use case insensitive queries in sqlplus a great deal, you might want to set up the case insensitive switch.

-- 
-----------------------
Jack F. Love
Opinions expressed are mine alone, unless you happen to agree
Received on Thu Oct 05 1995 - 00:00:00 CET

Original text of this message