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 bf05e51c0609121207u2951fb6dl970a7835f27e29db@mail.gmail.com
Whole thread Raw
In response to Combining output of several fields in SQL query  (Allan Kamau <kamauallan@yahoo.com>)
Responses 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:
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).

 
What does tableA look like (DDL and the data)?

==================================================================
   Aaron Bono
   Aranya Software Technologies, Inc.
   http://www.aranya.com
   http://codeelixir.com
==================================================================

pgsql-admin by date:

Previous
From: Allan Kamau
Date:
Subject: Combining output of several fields in SQL query
Next
From: "Mr. Dan"
Date:
Subject: COPY FROM command v8.1.4