Re: Add one column to another

From: "Oliveiros d'Azevedo Cristina" <oliveiros(dot)cristina(at)marktest(dot)pt>
To: "gvim" <gvimrc(at)gmail(dot)com>, "pgsql sql" <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Add one column to another
Date: 2011-08-25 14:52:03
Message-ID: 0D887B9957604C82AE742AC437E8AF0A@marktestcr.marktest.pt
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Something like this...?

SELECT first_name,surname, email1 || ';' || email2
FROM t_your_table;

Best,
Oliver

----- Original Message -----
From: "gvim" <gvimrc(at)gmail(dot)com>
To: "pgsql sql" <pgsql-sql(at)postgresql(dot)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(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-sql

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message David Johnston 2011-08-25 14:53:33 Re: Add one column to another
Previous Message Tony Capobianco 2011-08-25 14:30:21 Re: Add one column to another