Re: Concatenating string fields with GROUP BY clause

From: Godshall Michael <Michael_Godshall(at)gmachs(dot)com>
To: "'Brian G(dot) Huber'" <brianghuber(at)yahoo(dot)com>, pgsql-novice(at)postgresql(dot)org
Subject: Re: Concatenating string fields with GROUP BY clause
Date: 2003-09-09 17:10:10
Message-ID: A596FA3368757645AF862C701495CA0001B4453B@hor1mspmx01.gmachs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Concatenate is done with || in postgresql

-----Original Message-----
From: Brian G. Huber [mailto:brianghuber(at)yahoo(dot)com]
Sent: Tuesday, September 09, 2003 12:02 PM
To: pgsql-novice(at)postgresql(dot)org
Subject: [NOVICE] Concatenating string fields with GROUP BY clause

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:11:06 Re: Concatenating string fields with GROUP BY clause
Previous Message Jason Hihn 2003-09-09 17:07:47 Re: Modifying pg_shadow?