Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 42DA3B5DBFA for ; Thu, 25 Aug 2011 11:30:30 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 07443-03 for ; Thu, 25 Aug 2011 14:30:24 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from stan.prospectivdirect.com (mail.prospectiv.com [155.212.59.212]) by mail.postgresql.org (Postfix) with SMTP id B2CA6B5DBF7 for ; Thu, 25 Aug 2011 11:30:22 -0300 (ADT) Received: (qmail 31648 invoked from network); 25 Aug 2011 14:30:22 -0000 Received: from unknown (HELO ?192.168.1.15?) (192.168.1.15) by 0 with SMTP; 25 Aug 2011 14:30:22 -0000 Subject: Re: Add one column to another From: Tony Capobianco To: gvim Cc: pgsql sql In-Reply-To: <4E565A4E.9060400@gmail.com> References: <4E565A4E.9060400@gmail.com> Content-Type: text/plain; charset="UTF-8" Date: Thu, 25 Aug 2011 10:30:21 -0400 Message-ID: <1314282621.1994.1.camel@tony1.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.32.2 (2.32.2-1.fc14) Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.432 tagged_above=-5 required=5 tests=BAYES_00=-1.9, RP_MATCHES_RCVD=-0.532 X-Spam-Level: X-Archive-Number: 201108/105 X-Sequence-Number: 35773 Use the concat || operator. On Thu, 2011-08-25 at 15:21 +0100, gvim wrote: > 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 >