JOIN on set of rows?

Поиск
Список
Период
Сортировка
От Peter Fein
Тема JOIN on set of rows?
Дата
Msg-id 20050510181744.7ff2e2b3@layout.pfein.org
обсуждение исходный текст
Ответы Re: JOIN on set of rows?  (Peter Fein <pfein@pobox.com>)
Re: JOIN on set of rows?  (Richard Huxton <dev@archonet.com>)
Список pgsql-general
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 arbitrary app_name, app_id come from my app ;). I can't figure out
how to create something that acts like a table with rows specified in
the text of the query.

A temporary table perhaps?  I don't know much (anything) about these...

Thanks!

--
Peter Fein                 pfein@pobox.com                 773-575-0694

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

В списке pgsql-general по дате отправления:

Предыдущее
От: Michael Glaesemann
Дата:
Сообщение: Re: Loading a list of SQL scripts with relative paths
Следующее
От: Mischa Sandberg
Дата:
Сообщение: Re: [PERFORM] "Hash index" vs. "b-tree index" (PostgreSQL