Re: [GENERAL] JOIN exclusion problem

From: Anja Speerforck <anja(at)damn(dot)com>
To: Oliver Mueschke <o(at)mueschke(dot)de>
Cc: pgsql-general(at)postgreSQL(dot)org
Subject: Re: [GENERAL] JOIN exclusion problem
Date: 1999-07-01 15:56:10
Message-ID: 199907011559.LAA21556@chet.brysonweb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Mike Haberman 1999-07-01 16:25:12 help with SPI_<commands> Please
Previous Message Mike Engelhart 1999-07-01 15:33:52 Re: [GENERAL] LinuxPPC