Re: how to ignore case

Поиск
Список
Период
Сортировка
От Scott Marlowe
Тема Re: how to ignore case
Дата
Msg-id 1116530416.31821.103.camel@state.g2switchworks.com
обсуждение исходный текст
Ответ на how to ignore case  (lorid <lorid@dri.edu>)
Ответы Re: how to ignore case
Список pgsql-admin
On Thu, 2005-05-19 at 13:52, lorid wrote:
> How can I do a simple select statement ignoring the case ? kinda like \i
> in reg expressions ?
>
> thanks in advance

You can use upper/lower:

select * from table where lower(somefield) like '%abc%';

or REGEX:

select * from table where lower ~* '.*abc.*';

SEe:

http://www.postgresql.org/docs/8.0/static/functions-matching.html#FUNCTIONS-POSIX-TABLE

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

Предыдущее
От: "Jason Minion"
Дата:
Сообщение: Re: Can you generate SQL by using SQL in Postgres?
Следующее
От: Scott Marlowe
Дата:
Сообщение: Re: how to ignore case