Re: LEFT OUTER JOIN issue - Mailing list pgsql-sql

From Harald Fuchs
Subject Re: LEFT OUTER JOIN issue
Date
Msg-id puochcbwah.fsf@srv.protecting.net
Whole thread Raw
In response to LEFT OUTER JOIN issue  (Thomas BOURIMECH <thomas.bourimech@metnext.com>)
List pgsql-sql
In article <987929295D1345B5BCE249F42730CB82@marktestcr.marktest.pt>,
"Oliveiros" <oliveiros.cristina@marktest.pt> writes:

> Hi, Thomas.
> I believe it is because of your WHERE clause, which is filtering out the nulls
> from hp table.

> According to

> WHERE

> hp.poste_idposte = 275

> You only want registers that have hp.poste_idposte = 275, not the null ones.

Yes, the WHERE effectively turns the outer into an inner join, thus
removing rows from the right table.  By moving the WHERE to the JOIN
condition, you get the result you expected.



pgsql-sql by date:

Previous
From: Tom Lane
Date:
Subject: Re: Problem with insert related to different schemas
Next
From: Gonzalo Aguilar Delgado
Date:
Subject: Re: Problem with insert related to different schemas