From: David Johnston <polobo@yahoo.com>
To: 'gvim' <gvimrc@gmail.com>
To: 'pgsql sql' <pgsql-sql@postgresql.org>
Subject: Re: Add one column to another
Date: Thu, 25 Aug 2011 10:53:33 -0400
Message-ID: <021201cc6336$c3547e20$49fd7a60$@yahoo.com> (raw)
In-Reply-To: <4E565A4E.9060400@gmail.com>
References: <4E565A4E.9060400@gmail.com>
I have to deal with a table which contains:
first_name
surname
email1
email2
... and I would like to create a view which combines both email columns
thus:
first_name
surname
email
It looks simple but I can't think of an obvious query.
-----------------------------------------------------------
SELECT first_name, surname, ARRAY[email1, email2] AS email
FROM [...]
David J.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: polobo@yahoo.com, gvimrc@gmail.com
Subject: Re: Add one column to another
In-Reply-To: <021201cc6336$c3547e20$49fd7a60$@yahoo.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox