From: Bart Ogryczak <bart@bart.w-wa.pl>
To: pgsql-sql@postgreSQL.org
Subject: Re: [SQL] Searching Text Fields - Case Sensitive?
Date: Thu, 12 Aug 1999 17:24:05 +0200
Message-ID: <37B2E714.DB904C2B@bart.w-wa.pl> (raw)
References: <003401bee4d3$42774e20$0200a8c0@mike>
> Mike Field wrote:
> Hi-
> If I want to search a text field for a certain word, say 'foobar',
> using:
> SELECT * FROM mydb WHERE description LIKE "%foobar%";
> it seems to be case sensitive. Is there a way to do it so it is NOT
> case-sensitive?
SELECT * FROM mydb WHERE lower(description) LIKE "%foobar%";
bart
--
bart@bart.w-wa.pl || http://www.bart.w-wa.pl
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: bart@bart.w-wa.pl
Subject: Re: [SQL] Searching Text Fields - Case Sensitive?
In-Reply-To: <37B2E714.DB904C2B@bart.w-wa.pl>
References: <003401bee4d3$42774e20$0200a8c0@mike> <37B2E714.DB904C2B@bart.w-wa.pl>
* 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