X-Original-To: pgsql-sql@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id D08DC475C15 for ; Wed, 19 Feb 2003 17:05:49 -0500 (EST) Received: from postgresql.org ([64.49.215.8]) by localhost (postgresql.org [64.49.215.8:10024]) (amavisd-new) with SMTP id 64448-05 for ; Wed, 19 Feb 2003 17:05:39 -0500 (EST) Received: from ms-smtp-02.tampabay.rr.com (ms-smtp-02.tampabay.rr.com [65.32.1.39]) by postgresql.org (Postfix) with ESMTP id 4012B475FDE for ; Wed, 19 Feb 2003 16:15:31 -0500 (EST) Received: from mattspc (169-52.34-65.tampabay.rr.com [65.34.52.169]) by ms-smtp-02.tampabay.rr.com (8.12.5/8.12.5) with ESMTP id h1JLFQhg013745; Wed, 19 Feb 2003 16:15:26 -0500 (EST) From: "Matthew Nuzum" To: , "'Matthew Nuzum'" , Subject: Re: simple join problem Date: Wed, 19 Feb 2003 16:15:25 -0500 Organization: Bearfruit.org Message-ID: <004001c2d85c$05d214c0$6900a8c0@mattspc> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.4510 Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 In-Reply-To: <200302191249.26342.josh@agliodbs.com> X-Virus-Scanned: by amavisd-new X-Archive-Number: 200302/441 X-Sequence-Number: 11839 > > > > Here's my view definition: > > SELECT > > users.uid, users.loginid, users."password", users.title, > > users.firstname, users.middlename, users.lastname, users.suffix, > > users.organization, users.job_title, users_address.address1, > > users_address.address2, users_address.address3, users_address.city, > > users_address.state, users_address.zip, users_address.country, > > users_email.email, users_phone.phone > > FROM (((users > > LEFT JOIN users_address ON ((users.uid = users_address.uid AND > users_address.primary = TRUE))) > > LEFT JOIN users_email ON ((users.uid = users_email.uid and > users_email.primary = TRUE))) > > LEFT JOIN users_phone ON ((users.uid = users_phone.uid and > users_phone.primary = TRUE))) ; > > It's a neat trick that join conditions can be *any* expression that > evaluates > to a boolean value. That is a neat trick. Thanks for the info everyone. I feel better knowing that even though it was a simple problem it's not quite as obvious as I thought. -- Matthew Nuzum www.bearfruit.org cobalt@bearfruit.org