Re: [SQL] Searching Text Fields - Case Sensitive?

From: Bart Ogryczak <bart(at)bart(dot)w-wa(dot)pl>
To: pgsql-sql(at)postgreSQL(dot)org
Subject: Re: [SQL] Searching Text Fields - Case Sensitive?
Date: 1999-08-12 15:24:05
Message-ID: 37B2E714.DB904C2B@bart.w-wa.pl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

> 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(at)bart(dot)w-wa(dot)pl || http://www.bart.w-wa.pl

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Frank Morton 1999-08-12 15:51:33 Select Maximum Question
Previous Message Emils Klotins 1999-08-12 15:20:00 Re: [SQL] Problem with postgreSQL triggers