Received: from relay1.dnt.ro (IDENT:root@ns.dnt.ro [193.226.100.1]) by hub.org (8.9.2/8.9.1) with ESMTP id FAA16011 for ; Wed, 3 Feb 1999 05:46:47 -0500 (EST) (envelope-from vang@ppp-21.dnt.ro) Received: from ppp-21.dnt.ro (ppp-04.dnt.ro [193.231.125.4]) by relay1.dnt.ro (8.8.5/8.8.8+antispam) with ESMTP id MAA07527 for ; Wed, 3 Feb 1999 12:46:04 +0200 Received: (from vang@localhost) by ppp-21.dnt.ro (8.8.7/8.8.5) id MAA14212; Wed, 3 Feb 1999 12:49:42 -0500 Message-ID: <19990203124936.E13507@zeus.advatech.ro> Date: Wed, 3 Feb 1999 12:49:36 -0500 From: Viorel Anghel To: pgsql-sql@postgreSQL.org Subject: how to use arrays? Reply-To: vang@altavista.net Mail-Followup-To: pgsql-sql@postgreSQL.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.91.1i X-Organization: AdvaTech SRL Let's assume the following structure: create table T1 (name char(20), code int[]); insert into T1 values('abcd', '{1,2,3}'); ... insert into T1 values('xyz', '{3,1}'); Now i want to select all names which contains code=1 SELECT name FROM T1 WHERE 1=T1.code[1] or 1=T1.code[2] ... etc ??? -- ___ Viorel ANGHEL [`-'] -"-"-