Help with a view

Поиск
Список
Период
Сортировка
От Leif B. Kristensen
Тема Help with a view
Дата
Msg-id 200509221929.36043.leif@solumslekt.org
обсуждение исходный текст
Список pgsql-sql
I've created a view 'principals' that gives me this output:

pgslekt=> select * from principals where event=15821;person | event | place | sort_date  | tag_type
--------+-------+-------+------------+----------     2 | 15821 |  1152 | 1999-09-17 |        4     3 | 15821 |  1152 |
1999-09-17|        4
 
(2 rows)

How do I go about selecting the "other" person of this event, given that 
I have one of them and the event number? 

I'd also like a view that gives me the two rows combined into one, with 
"person" replaced by p1 and p2.
-- 
Leif Biberg Kristensen
http://solumslekt.org/


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

Предыдущее
От: andy rost
Дата:
Сообщение: Using descriptor areas to insert
Следующее
От: Axel Rau
Дата:
Сообщение: Re: Updating cidr column with network operator