Thread: case insensitive search

case insensitive search

From
Joern Muehlencord
Date:
Hello together,

how can I handle case insensitive search in a table?


-- 
Linux is like wigwam - no windows, no gates, apache inside.
In diesem Sinne Joern




Re: case insensitive search

From
"tjk@tksoft.com"
Date:
Joern,
select myfield from tablea where lower(myfield) = 'mysearch';
or
select myfield from tablea where myfield ~* 'mysearch';


Troy

>
> Hello together,
>
> how can I handle case insensitive search in a table?
>
>
>
> --
> Linux is like wigwam - no windows, no gates, apache inside.
> In diesem Sinne
>   Joern
>
>
>

Re: case insensitive search

From
"Mitch Vincent"
Date:
SELECT whatever FROM wherever WHERE lower(yourfield) = 'this';

You can do it with a case inseneitive regex search but they can't use
indexes and can become very slow on large tables..

SELECT whatever FROM wherever WHERE yourfield ~* 'this';
lower() does leak a bit of memory from what I've heard on the list but I'm
sure someone is working on it..

-Mitch

----- Original Message -----
From: Joern Muehlencord <jomu@uni-paderborn.de>
To: gpsql-sql <pgsql-sql@postgresql.org>
Sent: Monday, June 26, 2000 2:14 PM
Subject: [SQL] case insensitive search


> Hello together,
>
> how can I handle case insensitive search in a table?
>
>
>
> --
> Linux is like wigwam - no windows, no gates, apache inside.
> In diesem Sinne
>   Joern
>
>
>