Re: [GENERAL] JOIN exclusion problem - Mailing list pgsql-general

From Anja Speerforck
Subject Re: [GENERAL] JOIN exclusion problem
Date
Msg-id 199907011559.LAA21556@chet.brysonweb.com
Whole thread Raw
In response to JOIN exclusion problem  (Anja Speerforck <anja@damn.com>)
List pgsql-general
At 12:42 01.07.99 +0200, you wrote:
>select ... from a, b where a.x=b.x
>union
>select ... from a, c where a.x=c.x
>
>is this what you wanted to achieve?

Actually, more like

select ... from a, b where a.x=b.x
union
select ... from a, c where a.y=c.y

As Chris Bitmead wrote:

>The problem is you've got two different result sets you need here.....

>You either need to break it into two separate queries or else make it
>into a UNION. If it's a UNION you will need to specify explicity what to
>put into k.name when joining with agenturen. I'm guessing that you want
>it blank in such a case.

Which is correct.  I did try it as a UNION, and this didn't work since I do
need k.name to be blank.  I believe the solution is in fact two separate
queries.  We're trying that now....

Anja

pgsql-general by date:

Previous
From: "Mike Engelhart"
Date:
Subject: Re: [GENERAL] LinuxPPC
Next
From: Mike Haberman
Date:
Subject: help with SPI_ Please