Re: Case insensitive LIKE queries

From: <Oliver_Hall(at)scee(dot)net>
To: "Adam Lang" <aalang(at)rutgersinsurance(dot)com>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: Case insensitive LIKE queries
Date: 2000-11-01 15:33:01
Message-ID: OF87929CE9.51D70561-ON8025698A.00553104@internal.scee.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


Or use the regular expression syntax for case insensitive pattern matching

e.g. SELECT foo FROM bar WHERE foo *= 'aBc';

For more info, see:
http://www.postgresql.org/users-lounge/docs/7.0/user/operators2123.htm

Hope that helps,
Ol.

select * from myTable where upper(myField) like 'TEST';

Upper will change the fields to upper case for testing purposes.

Adam Lang
Systems Engineer
Rutgers Casualty Insurance Company
----- Original Message -----
From: "Yann Ramin" <atrus(at)atrustrivalie(dot)eu(dot)org>
To: <pgsql-general(at)postgresql(dot)org>
Sent: Wednesday, November 01, 2000 12:05 AM
Subject: [GENERAL] Case insensitive LIKE queries

> Hello,
>
> What would be the most effective way of preforming a case-insensitive
LIKE
> query? I've notived that MySQL somehow ALWAYS does it case insensitive,
> which is not very smart, but I should expect this feature to exist
without
> reasonable pain on the programmer;s end?
>
> Yann
>
> --
>
> --------------------------------------------------------------------
> Yann Ramin atrus(at)atrustrivalie(dot)eu(dot)org
> Atrus Trivalie Productions www.redshift.com/~yramin
> AIM oddatrus
> Marina, CA http://profiles.yahoo.com/theatrus
>
> IRM Developer Network Toaster Developer
> SNTS Developer KLevel Developer
> Electronics Hobbyist person who loves toys
>
> Build a man a fire, and he's warm for a day.
> Set a man on fire, and he'll be warm for the rest of his life.
>
> "I'm prepared for all emergencies but totally unprepared for everyday
> life."
> --------------------------------------------------------------------
>
>
>
>
>
>
>

**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

SCEE
**********************************************************************

Browse pgsql-general by date

  From Date Subject
Next Message John Burski 2000-11-01 16:30:48 Array Problem
Previous Message Continuing Technical Education 2000-11-01 15:01:22 Re: Problem with coalesce..