Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: Case insensitive select statement?

Re: Case insensitive select statement?

From: Mark <cdo_at_lambic.co.uk>
Date: Thu, 31 Aug 2000 19:18:56 GMT
Message-ID: <39AEAF94.22CBFAA5@lambic.co.uk>

Gary wrote:
> I'm trying to select all records beginning with the letters A, B, C, or D,
> but it must be a case insensitive search.
>
> e.g
> select name from table1
> where name like 'a%'

SELECT name
FROM table1
WHERE LOWER(name) like 'a%';

This converts the name column to lower case in the where clause. The problem with this solution is that any index on name will not be used. The better way is to store the data in one case, but of course that's not always possible. Received on Thu Aug 31 2000 - 14:18:56 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US