Re: Case (in)sensitive

Поиск
Список
Период
Сортировка
От
Тема Re: Case (in)sensitive
Дата
Msg-id OF2A375843.BC53C739-ON80256965.0045773D@internal.scee.net
обсуждение исходный текст
Ответ на Case (in)sensitive  (Boszormenyi Laszlo <gcs@jupiter.hlab.uni-miskolc.hu>)
Список 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
**********************************************************************

В списке pgsql-novice по дате отправления:

Предыдущее
От: "Tamsin"
Дата:
Сообщение: RE: distinct+trim=error?
Следующее
От: "Paulo Roberto Siqueira"
Дата:
Сообщение: Row level lock