Re: [GENERAL] Combining several rows

2004-05-24 Thread Greg Stark
Matthias Nagl <[EMAIL PROTECTED]> writes: > For a table like this I am looking for a query that returns a result that > looks this way: > > name > - > abc, def, ghi You need something like this: create function concat_agg_accum(varchar, varchar) returns varchar as 'select

Re: [GENERAL] Combining several rows

2004-05-24 Thread Tom Lane
Matthias Nagl <[EMAIL PROTECTED]> writes: > Let's say I've got a table in the following form: > SELECT * FROM test; > id | name > --- > 1 | abc > 2 | def > 3 | ghi > For a table like this I am looking for a query that returns a result that > looks this way: > name >

Re: [GENERAL] Combining several rows

2004-05-24 Thread Holger Klawitter
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, > I would like to combine the contents of several rows of a subquery. After > several hours of search in the documentation and the internet I didn'T find > a solution and hope anyone can help. My problem: You have to create your own aggreate. You

Re: [GENERAL] Combining several rows

2004-05-24 Thread Mike Mascari
Matthias Nagl wrote: Hello List! I would like to combine the contents of several rows of a subquery. After several hours of search in the documentation and the internet I didn'T find a solution and hope anyone can help. My problem: Let's say I've got a table in the following form: SELECT * FROM