X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 14281D1B50E for ; Wed, 15 Oct 2003 02:28:20 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 37118-10 for ; Tue, 14 Oct 2003 23:27:52 -0300 (ADT) Received: from mail.hive.nj2.inquent.com (mc.carriermail.com [205.178.180.9]) by svr1.postgresql.org (Postfix) with SMTP id 7F637D1B4FC for ; Tue, 14 Oct 2003 23:27:47 -0300 (ADT) Received: (qmail 22563 invoked from network); 15 Oct 2003 02:27:12 -0000 Received: from unknown (HELO ?192.168.1.199?) (134.22.69.154) by 205.178.180.9 with SMTP; 15 Oct 2003 02:27:12 -0000 Subject: Re: How can I produce the following desired result? From: Rod Taylor To: aicean Cc: pgsql-sql@postgresql.org In-Reply-To: <003401c392c1$86c75660$9e00a8c0@aicean> References: <003401c392c1$86c75660$9e00a8c0@aicean> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-vdnGCkGCoBLJS9ru9zMJ" Message-Id: <1066184866.99719.9.camel@jester> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 Date: Tue, 14 Oct 2003 22:27:47 -0400 X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200310/168 X-Sequence-Number: 15568 --=-vdnGCkGCoBLJS9ru9zMJ Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Tue, 2003-10-14 at 22:09, aicean wrote: > How can I produce the following desired result? I'm not sure I understand the problem, but you might want to try a subselect in the FROM. SELECT FROM table JOIN (SELECT goodid FROM table WHERE ) AS tab USING (goodid) WHERE --=-vdnGCkGCoBLJS9ru9zMJ Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (FreeBSD) iD8DBQA/jLCi6DETLow6vwwRAsNFAJ0bSZXY/iTzjvXZOTrzE2qHQ3ETWwCeMfBF knR1QpocbUy89O5CWQ9BhbU= =uixn -----END PGP SIGNATURE----- --=-vdnGCkGCoBLJS9ru9zMJ--