From: Allan Kamau <kamauallan@yahoo.com>
To: pgsql-admin@postgresql.org
Subject: Combining output of several fields in SQL query
Date: Tue, 12 Sep 2006 11:29:40 -0700 (PDT)
Message-ID: <20060912182941.4129.qmail@web53508.mail.yahoo.com> (raw)
Hi all,
This is a plain simple sql question appologies for
posting it here.
Am looking for a way of combining values from several
fields(and introducting value separators).
select field2+"_"+field1 from tableA;
I've tried
select field2||'_'||field1 from tableA;
I get "1" as the result(which is not what I want).
Allan.
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
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-admin@postgresql.org
Cc: kamauallan@yahoo.com
Subject: Re: Combining output of several fields in SQL query
In-Reply-To: <20060912182941.4129.qmail@web53508.mail.yahoo.com>
References: <20060912182941.4129.qmail@web53508.mail.yahoo.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