Re: 2 tables, joins and same name...

From: Alvaro Herrera <alvherre(at)atentus(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Re: 2 tables, joins and same name...
Date: 2001-09-01 08:46:30
Message-ID: Pine.LNX.4.33L2.0109010441460.6190-100000@aguila.protecne.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, 31 Aug 2001, Jeff Davis wrote:

> Whew... a little complex. I think I know what you are trying to do.

What's wrong with something like

select airport1.name as departure, airport2.name as arrival from
destination, airport as airport1, airport as airport2 where
airport1.airport_id=airport_dep_id and
airport2.airport_id=airport_arr_id;

?

Maybe I'm overlooking something, but it seems pretty straightforward to
me.

--
Alvaro Herrera (<alvherre[(at)]atentus(dot)com>)

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Michael Meskes 2001-09-01 09:45:55 Re: Embedded SQL vulnerability
Previous Message Tod McQuillin 2001-09-01 08:00:12 Re: select a random record