From: | "Dmitri Bichko" <dbichko(at)aveopharma(dot)com> |
---|---|
To: | "Leif B(dot) Kristensen" <leif(at)solumslekt(dot)org>, <pgsql-sql(at)postgresql(dot)org> |
Subject: | Re: Help with a view |
Date: | 2005-09-22 18:03:40 |
Message-ID: | F18A6F7CF1661F46920F2CF713122FED46CCAD@mail.aveo.aveopharma.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
SELECT * FROM principals WHERE event = 15821 AND person != 2?
Dmitri
> -----Original Message-----
> From: pgsql-sql-owner(at)postgresql(dot)org
> [mailto:pgsql-sql-owner(at)postgresql(dot)org] On Behalf Of Leif B.
> Kristensen
> Sent: Thursday, September 22, 2005 1:30 PM
> To: pgsql-sql(at)postgresql(dot)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 confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer
From | Date | Subject | |
---|---|---|---|
Next Message | Leif B. Kristensen | 2005-09-22 18:12:15 | Re: Help with a view |
Previous Message | Axel Rau | 2005-09-22 17:58:34 | Re: Updating cidr column with network operator |