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

From Anja Speerforck
Subject Re: [GENERAL] JOIN exclusion problem
Date
Msg-id 199907011347.JAA16799@chet.brysonweb.com
Whole thread Raw
In response to JOIN exclusion problem  (Anja Speerforck <anja@damn.com>)
Responses Re: [GENERAL] JOIN exclusion problem
List pgsql-general
At 11:24 01.07.99 +0100, you wrote:
>I'm not sure that I understand exactly what you are trying to do.  I'm
>guessing (and I mean guessing) that the tables are something like:
>
>ansprechpartner: private owner
>kunden: client
>agenturen: estate agent
>
The tables represent:

ansprechpartner = contact person
kunden = clients
agenturen = agencies

What I'm trying to do is get a list of all contact people, whether they're
associated with a specific client or a specific agency, so that the name of
the client or agency shows up in the results.
-------

>
>In the interim though, if you only what unique combinations of ag.name1 and
>k.name1 you could try:
>
>SELECT DISTINCT k.name1, ag.name1
>FROM ansprechpartner ap, kunden k, agenturen ag
>WHERE ap.kunden_nr = k.kunden_nr OR ap.agentur_nr = ag.agentur_nr;
>
>But somethings tells me that's not what you actually wanted!

You're right!  I need pretty much all of the data from ap, so that doesn't
work.  I'm trying some of the other suggestions that just came in next to
see if they work.

Thanks for your help,

Anja



pgsql-general by date:

Previous
From: "Colin Price (EML)"
Date:
Subject: RE: [GENERAL] 6.4.2 and 6.5 date usertype difference
Next
From: "Dan Wilson"
Date:
Subject: Re: [GENERAL] alter table add column is broken in 6.5