Re: [GENERAL] JOIN exclusion problem
От | Anja Speerforck |
---|---|
Тема | Re: [GENERAL] JOIN exclusion problem |
Дата | |
Msg-id | 199907011347.JAA16799@chet.brysonweb.com обсуждение исходный текст |
Ответ на | JOIN exclusion problem (Anja Speerforck <anja@damn.com>) |
Ответы |
Re: [GENERAL] JOIN exclusion problem
|
Список | 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 по дате отправления: