Re: JOIN on set of rows?

From: Peter Fein <pfein(at)pobox(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: JOIN on set of rows?
Date: 2005-05-10 23:43:28
Message-ID: 20050510184328.53260d8b@layout.pfein.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 05/10/05 06:17 PM CDT, Peter Fein <pfein(at)pobox(dot)com> said:
> Hiya-
>
> I need to do something like this:
>
> SELECT t1.symbol AS app_name, t2.outside_key AS app_id
> FROM t2 LEFT JOIN t1 ON t1.t2_id=t2.id AS my_join
> LEFT JOIN rows of arbitrary (app_name, app_id) ON
> my_join.app_name=rows.app_name AND my_join.app_id=rows.app_id
>

The other thought was:
SELECT t1.symbol AS app_name, t2.outside_key AS app_id
FROM t2 LEFT JOIN t1 ON t1.t2_id=t2.id AS my_join
UNION SELECT rows of arbitrary (app_name, app_id)

Thanks!

--
Peter Fein pfein(at)pobox(dot)com 773-575-0694

Basically, if you're not a utopianist, you're a schmuck. -J. Feldman

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Greg Stark 2005-05-10 23:56:15 Re: [PERFORM] "Hash index" vs. "b-tree index" (PostgreSQL
Previous Message Daniel Schuchardt 2005-05-10 23:31:46 Re: Delphi - Developers start develop Access components