Re: Let join syntax

From: Manfred Koizar <mkoi-pg(at)aon(dot)at>
To: "Nicolas JOUANIN" <n(dot)jouanin(at)regie-france(dot)com>
Cc: <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Let join syntax
Date: 2003-06-16 10:57:37
Message-ID: 838rev0q8nt2j1pltfpq30akoqbc3rdcs7@4ax.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Mon, 16 Jun 2003 12:34:34 +0200, "Nicolas JOUANIN"
<n(dot)jouanin(at)regie-france(dot)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

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Tomasz Myrta 2003-06-16 13:51:35 casting interval to time
Previous Message Nicolas JOUANIN 2003-06-16 10:34:34 Let join syntax