From: Aaron Bono <postgresql@aranya.com>
To: Allan Kamau <kamauallan@yahoo.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: Combining output of several fields in SQL query
Date: Tue, 12 Sep 2006 15:08:35 -0500
Message-ID: <bf05e51c0609121308n49967bddn21d7379bf4edde5f@mail.gmail.com> (raw)
In-Reply-To: <20060912192628.63526.qmail@web53510.mail.yahoo.com>
References: <bf05e51c0609121207u2951fb6dl970a7835f27e29db@mail.gmail.com>
<20060912192628.63526.qmail@web53510.mail.yahoo.com>
On 9/12/06, Allan Kamau <kamauallan@yahoo.com> wrote:
>
> create table tableA(
> s_l_p_p_v_i text not null,
> field1 text not null,
> field2 text not null,
> primary key(field1,field2));
>
> s_l_p_p_v_i field1 field1
> abc 2 1
> xyz 2 4
> klm 2 3
Your initial query:
select field2||'_'||field1 from tableA;
works perfectly for me:
?column?
4_2
1_2
3_2
Are you sure you are not getting the correct results?
==================================================================
Aaron Bono
Aranya Software Technologies, Inc.
http://www.aranya.comhttp://codeelixir.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: postgresql@aranya.com, kamauallan@yahoo.com
Subject: Re: Combining output of several fields in SQL query
In-Reply-To: <bf05e51c0609121308n49967bddn21d7379bf4edde5f@mail.gmail.com>
References: <bf05e51c0609121207u2951fb6dl970a7835f27e29db@mail.gmail.com> <20060912192628.63526.qmail@web53510.mail.yahoo.com> <bf05e51c0609121308n49967bddn21d7379bf4edde5f@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