Hello
2007/8/21, Josh Trutwin <josh(at)trutwins(dot)homeip(dot)net>:
> Hi - I have the following array field:
>
> SELECT pb_ids FROM pb WHERE id = 123:
>
> pb_id
> -----------------------
> {196,213,215,229,409}
>
> These numbers map to a productid in tblproducts so I figured I could
> do this:
>
> SELECT *
> FROM tblproducts
> WHERE productid = ANY (
> SELECT pb_ids FROM pb WHERE id=123
> );
>
SELECT * FROM ... WHERE 1000 IN (SELECT pb_ids FROM pb WHERE id=123)
or
SELECT * FROM ... WHERE 1000 = ANY(ARRAY(SELECT pb_ids FROM pb WHERE id=123))
Pavel