Re: Help with a view

Поиск
Список
Период
Сортировка
От Dmitri Bichko
Тема Re: Help with a view
Дата
Msg-id F18A6F7CF1661F46920F2CF713122FED46CCAD@mail.aveo.aveopharma.com
обсуждение исходный текст
Ответ на Help with a view  ("Leif B. Kristensen" <leif@solumslekt.org>)
Ответы Re: Help with a view  ("Leif B. Kristensen" <leif@solumslekt.org>)
Список pgsql-sql
SELECT * FROM principals WHERE event = 15821 AND person != 2?

Dmitri

> -----Original Message-----
> From: pgsql-sql-owner@postgresql.org
> [mailto:pgsql-sql-owner@postgresql.org] On Behalf Of Leif B.
> Kristensen
> Sent: Thursday, September 22, 2005 1:30 PM
> To: pgsql-sql@postgresql.org
> Subject: [SQL] Help with a view
>
>
> 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/
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 4: Have you searched our list archives?
>               http://archives.postgresql.org
The information transmitted is intended only for the person or entity to which it is addressed and may contain
confidentialand/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any
actionin reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you
receivedthis in error, please contact the sender and delete the material from any computer 


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

Предыдущее
От: Axel Rau
Дата:
Сообщение: Re: Updating cidr column with network operator
Следующее
От: "Leif B. Kristensen"
Дата:
Сообщение: Re: Help with a view