On Tue, 21 Aug 2007 21:36:00 +0200 "Pavel Stehule" <pavel.stehule@xxxxxxxxx> 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 ---------------------------(end of broadcast)--------------------------- TIP 6: explain analyze is your friend