X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.193]) by svr1.postgresql.org (Postfix) with ESMTP id CF63930EC9E for ; Mon, 16 Jun 2003 10:58:19 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (svr1.postgresql.org [64.117.224.193]) (amavisd-new, port 10024) with ESMTP id 01104-06 for ; Mon, 16 Jun 2003 07:58:09 -0300 (ADT) Received: from email01.aon.at (WARSL402PIP8.highway.telekom.at [195.3.96.97]) by svr1.postgresql.org (Postfix) with SMTP id E8BB130EE07 for ; Mon, 16 Jun 2003 07:58:08 -0300 (ADT) Received: (qmail 537958 invoked from network); 16 Jun 2003 10:58:07 -0000 Received: from m149p004.dipool.highway.telekom.at (HELO cantor) ([62.46.8.132]) (envelope-sender ) by qmail1rs.highway.telekom.at (qmail-ldap-1.03) with SMTP for ; 16 Jun 2003 10:58:07 -0000 From: Manfred Koizar To: "Nicolas JOUANIN" Cc: Subject: Re: Let join syntax Date: Mon, 16 Jun 2003 12:57:37 +0200 Message-ID: <838rev0q8nt2j1pltfpq30akoqbc3rdcs7@4ax.com> References: In-Reply-To: X-Mailer: Forte Agent 1.93/32.576 English (American) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Archive-Number: 200306/139 X-Sequence-Number: 13897 On Mon, 16 Jun 2003 12:34:34 +0200, "Nicolas JOUANIN" wrote: >from > coh x0 , cpy x1 ,bra x2 , > cur x3 ,tad x4 LEFT OUTER JOIN sec x5 on x5.thr_id=x4.thr_id AND >x5.usr_id=x0.usr_id AND [...] > >Unfortunatelly, postgres returns me the following error : > Error: ERROR: Relation "x0" does not exist Yes, because the LEFT OUTER JOIN only sees x4 and x5. I have not analysed all your join conditions, but FROM coh x0 INNER JOIN cpy x1 ON [...] INNER JOIN bra x2 ON [...] INNER JOIN cur x3 ON [...] INNER JOIN tad x4 ON [...] LEFT JOIN sec x5 ON [...] might work. If there is nothing to join x1, x2, x3, x4 on, you could try to put x5 to the front and use RIGHT JOINs ... Servus Manfred