From: James Olin Oden <joden@lee.k12.nc.us>
To: pgsql-sql@postgreSQL.org <pgsql-sql@postgreSQL.org>
Subject: Re: [SQL] Concatenation in selects
Date: Thu, 3 Sep 1998 10:16:33 -0400
Message-ID: <81Sep2.090702edt.35713@gateway.lee.k12.nc.us> (raw)
References: <81Sep2.081317edt.35713@gateway.lee.k12.nc.us>
> I know it can be done, but I cannot seem to figure out how to output to
> fields concatenated together in a select. For instance, I have a table
> with first_name and last_name as fields (among others). I would like
> display first_name and last_name as one field. I want to do something
> like:
>
> name=first_name + " " + last_name
>
> but of course within an SQL select statement. Thanks...james
Sorry, I finally found it in the hackers mailing list. The answer is:
select textcat(textcat(first_name, ' '),last_name) from users;
I just couldn't seem to find that documented, I am sure it is though.
Thanks...james
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: joden@lee.k12.nc.us
Subject: Re: [SQL] Concatenation in selects
In-Reply-To: <81Sep2.090702edt.35713@gateway.lee.k12.nc.us>
References: <81Sep2.081317edt.35713@gateway.lee.k12.nc.us> <81Sep2.090702edt.35713@gateway.lee.k12.nc.us>
* 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