From: Oliveiros d'Azevedo Cristina <oliveiros.cristina@marktest.pt>
To: gvim <gvimrc@gmail.com>
To: pgsql sql <pgsql-sql@postgresql.org>
Subject: Re: Add one column to another
Date: Thu, 25 Aug 2011 15:52:03 +0100
Message-ID: <0D887B9957604C82AE742AC437E8AF0A@marktestcr.marktest.pt> (raw)
References: <4E565A4E.9060400@gmail.com>
Something like this...?
SELECT first_name,surname, email1 || ';' || email2
FROM t_your_table;
Best,
Oliver
----- Original Message -----
From: "gvim" <gvimrc@gmail.com>
To: "pgsql sql" <pgsql-sql@postgresql.org>
Sent: Thursday, August 25, 2011 3:21 PM
Subject: [SQL] Add one column to another
>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.
>
> gvim
>
> --
> Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-sql
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: oliveiros.cristina@marktest.pt, gvimrc@gmail.com
Subject: Re: Add one column to another
In-Reply-To: <0D887B9957604C82AE742AC437E8AF0A@marktestcr.marktest.pt>
* 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