Concatenating string fields with GROUP BY clause

From: "Brian G(dot) Huber" <brianghuber(at)yahoo(dot)com>
To: <pgsql-novice(at)postgresql(dot)org>
Subject: Concatenating string fields with GROUP BY clause
Date: 2003-09-09 17:01:54
Message-ID: 001b01c376f4$124dc410$6400a8c0@bghmobile
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hi -

I am trying to concatenate a text field in a query with a group by clause, similar to a sum() function on a numeric value - for example:

SELECT groupid, sum(numeric_field), ???(text_field) FROM table GROUP BY groupid

but I cannot find a function that will concatenate the text fields. Any comments appreciated!

TIA,BGH

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Jason Hihn 2003-09-09 17:07:47 Re: Modifying pg_shadow?
Previous Message Tom Lane 2003-09-09 16:24:09 Re: Modifying pg_shadow?