Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: case sensitive
--------------CA49BD1D64A1992417D5B41F Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit
David BARATTE wrote:
> Hi,
>
> Is there a function in SQL which doesn't care of the case
> of a string when you use a SELECT statement.
>
> e.g: with a record containing the string TOTO
> i want to retrieve it with
>
> select * from table_name where field_name='toto'
>
> Thanks in advance.
>
> mailto:david.baratte_at_uhb.fr
select * from table_name where lower (table_name) = 'toto' ; select * from table_name where upper (table_name) = 'TOTO' ;
of course that means you won't be using any index on table_name for the query :(
-- ___ ___ (___)=============================================================(___) | | Jacques Raymond Kilchoer MIS:Applications Support | | | | Assistant DBA /^\ ^ (714) 729-4500 x3733 | | | | Cost Care, Inc. /\ _/ \/ \ fax 729-4651 | | | | Newport Beach /\ /\/ \// \ \_/\ | | | | CA 92660 / \ / / \ / \ Suisse/Schweizer | | |___| ____/____\____/_________\___ _\_______ Svizzero |___| (___)=============================================================(___) --------------CA49BD1D64A1992417D5B41F Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit <HTML> David BARATTE wrote: <BLOCKQUOTE TYPE=CITE>Hi, <P> Is there a function in SQL which doesn't care of the case <BR>of a string when you use a SELECT statement. <P>e.g: with a record containing the string TOTO <BR> i want to retrieve it with <P> select * from table_name where field_name='toto' <P> Thanks in advance. <P><A HREF="mailto:david.baratte_at_uhb.fr">mailto:david.baratte_at_uhb.fr</A></BLOCKQUOTE> select * from table_name where lower (table_name) = 'toto' ; <BR>select * from table_name where upper (table_name) = 'TOTO' ; <P>of course that means you won't be using any index on table_name for the query :( <P>-- <BR><TT> ___ ___</TT> <BR><TT>(___)=============================================================(___)</TT> <BR><TT>| | Jacques Raymond Kilchoer MIS:Applications Support | |</TT> <BR><TT>| | Assistant DBA /^\ ^ (714) 729-4500 x3733 | |</TT> <BR><TT>| | Cost Care, Inc. /\ _/ \/ \ fax 729-4651 | |</TT> <BR><TT>| | Newport Beach /\ /\/ \// \ \_/\ | |</TT> <BR><TT>| | CA 92660 / \ / / \ / \ Suisse/Schweizer | |</TT> <BR><TT>|___| ____/____\____/_________\___ _\_______ Svizzero |___|</TT> <BR><TT>(___)=============================================================(___)</TT> <BR> </HTML> --------------CA49BD1D64A1992417D5B41F--Received on Thu Jul 03 1997 - 00:00:00 CDT
![]() |
![]() |