From: The Hermit Hacker <scrappy@hub.org>
To: Dana M. Epp <eppdm@netmaster.ca>
Cc: pgsql-sql@postgreSQL.org
Subject: Re: [SQL] Doing case-insensitive queries.
Date: Tue, 26 May 1998 13:34:33 -0400 (EDT)
Message-ID: <Pine.BSF.3.96.980526133401.19802j-100000@hub.org> (raw)
In-Reply-To: <356AFAD2.23A33F4D@netmaster.ca>
On Tue, 26 May 1998, Dana M. Epp wrote:
> I am trying to query a database case-insenstively on a char() field, and
> failing miserably. Could anyone direct me to some documentation that
> properly explains how to accomplish such a task in PostgreSQL.
>
> Items like ~* don't work when using the LIKE for me.
>
> Here is my current code segment on how I am doing this query with case
> sensitivity.
>
>
> $qstring = "select * from $database where vendor LIKE
> \'\%$inqstring\%\' ; ";
>
> $result = $con->exec($qstring);
>
> Can anyone tell me how I could query that without case-sensitivity?
select * from $database where vendor *~ '$inqstring';
I might have that *~ backwards...if that fails, try ~* :(
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: scrappy@hub.org, eppdm@netmaster.ca
Subject: Re: [SQL] Doing case-insensitive queries.
In-Reply-To: <Pine.BSF.3.96.980526133401.19802j-100000@hub.org>
References: <356AFAD2.23A33F4D@netmaster.ca> <Pine.BSF.3.96.980526133401.19802j-100000@hub.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox