From: | Anja Speerforck <anja(at)damn(dot)com> |
---|---|
To: | Stuart Rison <stuart(at)ludwig(dot)ucl(dot)ac(dot)uk> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: [GENERAL] JOIN exclusion problem |
Date: | 1999-07-01 13:43:27 |
Message-ID: | 199907011347.JAA16799@chet.brysonweb.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Dan Wilson | 1999-07-01 14:27:18 | Re: [GENERAL] alter table add column is broken in 6.5 |
Previous Message | Colin Price (EML) | 1999-07-01 13:31:11 | RE: [GENERAL] 6.4.2 and 6.5 date usertype difference |