Re: [GENERAL] non-case sensitive searches - Mailing list pgsql-general

From Gilles Darold
Subject Re: [GENERAL] non-case sensitive searches
Date
Msg-id 369C5EDF.C82CC4D@neptune.fr
Whole thread Raw
In response to non-case sensitive searches  (Kevin Heflin <kheflin@shreve.net>)
Responses Re: [GENERAL] non-case sensitive searches
List pgsql-general
Hi Kevin,

You can also use regexp expression like this :

    SELECT * FROM photos WHERE keywords ~* '.*$cat_name.*';

it works fine.

Gilles

Kevin Heflin wrote:

> Currently I have a select statement like so:
>
> select * from photos where keywords LIKE '%$cat_name%'
>
> The above select statement works, except that it is case sensitive.
> Is there a way to do this that is not case sensitive?
>
> Kevin
>
> --------------------------------------------------------------------
> Kevin Heflin          | ShreveNet, Inc.      | Ph:318.222.2638 x103
> VP/Mac Tech           | 333 Texas St #619    | FAX:318.221.6612
> kheflin@shreve.net    | Shreveport, LA 71101 | http://www.shreve.net
> --------------------------------------------------------------------




pgsql-general by date:

Previous
From: Kevin Heflin
Date:
Subject: Re: [GENERAL] non-case sensitive searches
Next
From: Silvio Emanuel Barbosa de Macedo
Date:
Subject: Re: linux/unix ODBC driver