Concat field result in select query

From: "Nacef LABIDI" <nacef(dot)l(at)gmail(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: Concat field result in select query
Date: 2008-08-22 13:40:51
Message-ID: f16f7ea00808220640q2fedf39em206443d4c5c4fec7@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hi all,

I was wondering if there is a way to concatenate the results of a field in a
select to return it as a single string.

Example :

my_field
--------------
1
2
3

select concat_something(my_field) from my_table group by something;
the result expected would be someting like that : 1/2/3 (with a separator it
would be really nice)

I hope that I am not asking for too much ;)

Thanks to all

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Nacef LABIDI 2008-08-22 13:58:22 Re: Concat field result in select query
Previous Message s.caillet 2008-08-22 09:02:29 Re: Question on partitioning