From: | "Leif B(dot) Kristensen" <leif(at)solumslekt(dot)org> |
---|---|
To: | pgsql-sql(at)postgresql(dot)org |
Subject: | Help with a view |
Date: | 2005-09-22 17:29:35 |
Message-ID: | 200509221929.36043.leif@solumslekt.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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/
From | Date | Subject | |
---|---|---|---|
Next Message | Axel Rau | 2005-09-22 17:58:34 | Re: Updating cidr column with network operator |
Previous Message | Kenneth Hutchinson | 2005-09-22 16:22:22 | Issue with UPDATE statement on v8 |