Re: Array with Subselect / ANY - cast?

Поиск
Список
Период
Сортировка
От Josh Trutwin
Тема Re: Array with Subselect / ANY - cast?
Дата
Msg-id 20070821144353.5c8412ca@sinkhole.intrcomm.net
обсуждение исходный текст
Ответ на Re: Array with Subselect / ANY - cast?  ("Pavel Stehule" <pavel.stehule@gmail.com>)
Список pgsql-general
On Tue, 21 Aug 2007 21:36:00 +0200
"Pavel Stehule" <pavel.stehule@gmail.com> wrote:

> it works? no.
>
> pavel=# select 1 from (values(10)) a(i)  where i = any((select *
> from foo)::int[]);
> ERROR:  cannot cast type integer to integer[]
> LINE 1: ...values(10)) a(i)  where i = any((select * from
> foo)::int[]); ^
> pavel=#

oops - forgot to send to list:

This is the exact query I ran which produces a result set:

select * from tblproducts
where productid = ANY(
   (select pb_correspondence from pb.pb_nurse
     where id = 140)::integer[]
)
order by productid;

Your query looks similar - maybe it's the "select *" in the subquery?

Either way I actually found a better way to do what I was trying to
do here so no worries.  :)

Josh

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

Предыдущее
От: "Dmitry Koterov"
Дата:
Сообщение: Re: Need help doing a PostgreSQL vs Firebird feature comparison
Следующее
От: "Ed L."
Дата:
Сообщение: Re: history table