pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Manfred Koizar <mkoi-pg@aon.at>
To: Nicolas JOUANIN <n.jouanin@regie-france.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Let join syntax
Date: Mon, 16 Jun 2003 12:57:37 +0200
Message-ID: <838rev0q8nt2j1pltfpq30akoqbc3rdcs7@4ax.com> (raw)
In-Reply-To: <CEEJJOCKHCPFNIOMMIDFGECICHAA.n.jouanin@regie-france.com>
References: <CEEJJOCKHCPFNIOMMIDFGECICHAA.n.jouanin@regie-france.com>

On Mon, 16 Jun 2003 12:34:34 +0200, "Nicolas JOUANIN"
<n.jouanin@regie-france.com> 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



view thread (5+ messages)  latest in thread

Message-ID: <838rev0q8nt2j1pltfpq30akoqbc3rdcs7@4ax.com>
Permalink:  ../838rev0q8nt2j1pltfpq30akoqbc3rdcs7@4ax.com/
Also on:    postgresql.org/message-id/838rev0q8nt2j1pltfpq30akoqbc3rdcs7@4ax.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: mkoi-pg@aon.at, n.jouanin@regie-france.com
  Subject: Re: Let join syntax
  In-Reply-To: <838rev0q8nt2j1pltfpq30akoqbc3rdcs7@4ax.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox