Re: where col1 not ilike ('str1%', 'str2%'... 'strN%') support?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: where col1 not ilike ('str1%', 'str2%'... 'strN%') support?
Дата
Msg-id 16967.1314717876@sss.pgh.pa.us
обсуждение исходный текст
Ответ на where col1 not ilike ('str1%', 'str2%'... 'strN%') support?  (Emi Lu <emilu@encs.concordia.ca>)
Ответы Re: where col1 not ilike ('str1%', 'str2%'... 'strN%') support?  (Emi Lu <emilu@encs.concordia.ca>)
Список pgsql-sql
Emi Lu <emilu@encs.concordia.ca> writes:
> Does psql provide something like the following query command?

> select * from tablename
> where col1 not ilike ('str1%', 'str2%'... 'strN%')

If you remember the operator name equivalent to ILIKE (~~*)
you can do

select * from tablename
where not (col1 ~~* any(array['str1%', 'str2%'... 'strN%']));
        regards, tom lane


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

Предыдущее
От: Julien Cigar
Дата:
Сообщение: Re: where col1 not ilike ('str1%', 'str2%'... 'strN%') support?
Следующее
От: Emi Lu
Дата:
Сообщение: Re: where col1 not ilike ('str1%', 'str2%'... 'strN%') support?