pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Aaron Bono <postgresql@aranya.com>
To: George Handin <postgresql@dafunks.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Concat two fields into one at runtime
Date: Thu, 8 Jun 2006 10:53:50 -0500
Message-ID: <bf05e51c0606080853o6f349107u868a68224e2eed5b@mail.gmail.com> (raw)
In-Reply-To: <44884736.3080309@dafunks.com>
References: <44884736.3080309@dafunks.com>

select id, first || ' ' || last
from mytable;

On 6/8/06, George Handin <postgresql@dafunks.com> wrote:
>
> Is there a way using built-in PostgreSQL functions to combine two data
> fields into a single field at runtime when querying data?
>
> For example, the query now returns:
>
> id    first    last
> ---   -------  ----------
> 1     Goerge   Handin
> 2     Joe      Rachin
>
> I'd like it to return:
>
> id    name
> ---   -------------------
> 1     George Handin
> 2     Joe Rachin
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: don't forget to increase your free space map settings
>

view thread (5+ messages)  latest in thread

Message-ID: <bf05e51c0606080853o6f349107u868a68224e2eed5b@mail.gmail.com>
Permalink:  ../bf05e51c0606080853o6f349107u868a68224e2eed5b@mail.gmail.com/
Also on:    postgresql.org/message-id/bf05e51c0606080853o6f349107u868a68224e2eed5b@mail.gmail.com

 · 

reply

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: postgresql@aranya.com, postgresql@dafunks.com
  Subject: Re: Concat two fields into one at runtime
  In-Reply-To: <bf05e51c0606080853o6f349107u868a68224e2eed5b@mail.gmail.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