"like any" in reverse?

Поиск
Список
Период
Сортировка
От Gauthier, Dave
Тема "like any" in reverse?
Дата
Msg-id 482E80323A35A54498B8B70FF2B87980044450D424@azsmsx504.amr.corp.intel.com
обсуждение исходный текст
Ответы Re: "like any" in reverse?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general

Hi:

 

create table foo (lst text[]);

insert into foo (lst) values (array[‘jack’,’fred’,’jen’,’sue’]);

 

I want to find all records where any element of lst like ‘j%’. 

 

This does not work...

 

select * from foo where ‘j%’ like any(lst);

 

Intuitively, you’d think....

 

select * from foo where any(lst) like ‘j%’;

 

... but that’s a syntax error.

 

 

Can this be done?

 

Thanks in Advance !

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

Предыдущее
От: Robert James
Дата:
Сообщение: Postgres standard versus Postgres Plus Advanced Server
Следующее
От: u235sentinel
Дата:
Сообщение: Re: Postgres Triggers issue