Re: Case (in)sensitive

From: <Oliver_Hall(at)scee(dot)net>
To: Boszormenyi Laszlo <gcs(at)jupiter(dot)hlab(dot)uni-miskolc(dot)hu>
Cc: pgsql-novice(at)hub(dot)org
Subject: Re: Case (in)sensitive
Date: 2000-09-25 12:43:29
Message-ID: OF2A375843.BC53C739-ON80256965.0045773D@internal.scee.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice


You can use the regular expression (powerful pattern matching) syntax:

SELECT * FROM xyz WHERE field ~* '.*bud';

The ~* is a case insensitive pattern match operator, and (as an example of
a regular expression) '.*bud' matches zero or more characters followed by
'bud'

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

Hope that helps,
Ol.

Hello!

I have a database with city names, so the first letter is capitalised.
I want to let the user search for part of the city name. How can I do case
insensitive for this? You know "... like '%bud%';" won't find Budapest.

Thanks in advance,
Laszlo Boszormenyi

**********************************************************************
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-novice by date

  From Date Subject
Next Message Paulo Roberto Siqueira 2000-09-26 00:07:38 Row level lock
Previous Message Tamsin 2000-09-24 13:45:47 RE: distinct+trim=error?