Received: from wolff.to (wolff.to [66.92.219.49]) by postgresql.org (8.11.3/8.11.4) with SMTP id g1AG3KE62897 for ; Sun, 10 Feb 2002 11:03:20 -0500 (EST) (envelope-from bruno@wolff.to) Received: (qmail 31299 invoked by uid 500); 10 Feb 2002 16:04:39 -0000 Date: Sun, 10 Feb 2002 10:04:39 -0600 From: Bruno Wolff III To: James Carrier Cc: pgsql-sql@postgresql.org Subject: Re: SQL Help - multi values Message-ID: <20020210160439.GA31247@wolff.to> Mail-Followup-To: James Carrier , pgsql-sql@postgresql.org References: <5.1.0.14.2.20020210063242.00b18da0@bunce.bitecomm.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5.1.0.14.2.20020210063242.00b18da0@bunce.bitecomm.co.uk> User-Agent: Mutt/1.3.25i X-Archive-Number: 200202/101 X-Sequence-Number: 6529 On Sun, Feb 10, 2002 at 06:34:52AM +0000, James Carrier wrote: > > But in the example above this would return 3 entries, which I don't want, > and I can't select a particular dataid which satisfies more than category, > e.g. has categories 4 and 7 (i.e. for the example above the LIKE statement > would be: WHERE category LIKE '%|4|%' AND LIKE '%|7|%'). It is possible to write queries that return a list of dataids that having an enrty for more than one specific category. However, it seems like you probably want to encode the category list in a bit string based on how you have indicated you want to use it.