Re: Combining output of several fields in SQL query - Mailing list pgsql-admin

From Aaron Bono
Subject Re: Combining output of several fields in SQL query
Date
Msg-id bf05e51c0609121308n49967bddn21d7379bf4edde5f@mail.gmail.com
Whole thread Raw
In response to Re: Combining output of several fields in SQL query  (Allan Kamau <kamauallan@yahoo.com>)
List pgsql-admin
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.com
   http://codeelixir.com
==================================================================

pgsql-admin by date:

Previous
From: "Fernando Machado"
Date:
Subject: Data Synch
Next
From: "Mr. Dan"
Date:
Subject: COPY FROM command v8.1.4