Received: from localhost (unknown [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 5F8332E22B6 for ; Wed, 14 Nov 2007 09:31:26 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 36171-01 for ; Wed, 14 Nov 2007 09:31:07 -0400 (AST) Received: from depesz.com (depesz.com [88.198.37.40]) by postgresql.org (Postfix) with ESMTP id 658C12E174F for ; Wed, 14 Nov 2007 09:31:18 -0400 (AST) Received: from depesz by depesz.com with local (Exim 4.63) (envelope-from ) id 1IsIKq-0002p4-Cu; Wed, 14 Nov 2007 14:31:16 +0100 Date: Wed, 14 Nov 2007 14:31:16 +0100 From: hubert depesz lubaczewski To: Julien Cigar Cc: pgsql-sql@postgresql.org Subject: Re: ALL() question Message-ID: <20071114133116.GA10440@depesz.com> Reply-To: depesz@depesz.com References: <1195047542.3190.9.camel@frodon.be-bif.ulb.ac.be> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1195047542.3190.9.camel@frodon.be-bif.ulb.ac.be> User-Agent: Mutt/1.5.13 (2006-08-11) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200711/69 X-Sequence-Number: 29597 On Wed, Nov 14, 2007 at 02:39:02PM +0100, Julien Cigar wrote: > With the following I got a syntax error: > select specimen_id > from specimen_test_bits > where test_bit_id = all(1,2,3,4); where test_bit_id in (1,2,3,4) group by specimen_id having count(distinct test_bit_id) = 4; depesz -- quicksil1er: "postgres is excellent, but like any DB it requires a highly paid DBA. here's my CV!" :) http://www.depesz.com/ - blog dla ciebie (i moje CV)