Re: Left outer join with WHERE clause? - Mailing list pgsql-sql

From DI Hasenöhrl
Subject Re: Left outer join with WHERE clause?
Date
Msg-id 005e01c1d66d$964ea3c0$01011eac@irina
Whole thread Raw
In response to Left outer join with WHERE clause?  (DI Hasenöhrl <i.hasenoehrl@aon.at>)
List pgsql-sql
Sorry, I found my mistake. It was an incorrect parenthesis.
 
Thanks again
Irina
----- Original Message -----
Sent: Thursday, March 28, 2002 2:10 PM
Subject: Re: [SQL] Left outer join with WHERE clause?

On 28 Mar 2002 at 13:58, DI Hasenöhrl wrote:

> It doesn't work too:            LEFT JOIN (vartikellieferantbez ON
> artikel.a_nr = vartikellieferantbez.a_nr WHERE
> ((vartikellieferantbez.f_nr)=1)

Your "where" clause for an OUTER JOIN is actually the ON statement.  So do this: 

LEFT JOIN (vartikellieferantbez ON (artikel.a_nr = vartikellieferantbez.a_nr  AND
vartikellieferantbez.f_nr = 1)) 

pgsql-sql by date:

Previous
From: DI Hasenöhrl
Date:
Subject: Re: Left outer join with WHERE clause?
Next
From: Jeff Eckermann
Date:
Subject: Re: function error