Re: The problem with FULL JOIN

From: Gregory Stark <stark(at)enterprisedb(dot)com>
To: <Eugen(dot)Konkov(at)aldec(dot)com>
Cc: <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: The problem with FULL JOIN
Date: 2008-03-30 17:44:58
Message-ID: 87r6ds3y3p.fsf@oxford.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

<Eugen(dot)Konkov(at)aldec(dot)com> writes:

> PROBLEM:
> How to FULL JOIN groups=1 from table 'a' with groups=2 from table 'b'
> and exclude original NULL groups not thouse which FULL JOIN produce?
...

SELECT *
FROM (select * from a where a.groups = 1) AS a
FULL OUTER JOIN (select * from b where b.groups = 2) AS b
ON (a.num1=b.num1)

--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com
Ask me about EnterpriseDB's RemoteDBA services!

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Stephan Szabo 2008-03-30 17:51:14 Re: The problem with FULL JOIN
Previous Message Gregory Stark 2008-03-30 17:40:53 Re: BUG #4069: Wrong tip