Re: Merging rows into one result?

From: Volkan YAZICI <yazicivo(at)ttnet(dot)net(dot)tr>
To: "Jesper K(dot) Pedersen" <jkp(at)solnet(dot)homeip(dot)net>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Merging rows into one result?
Date: 2006-03-11 16:48:00
Message-ID: 20060311164800.GA218@alamut
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hi,

On Mar 11 05:31, Jesper K. Pedersen wrote:
> Is it possible to use SQL to merge data into one result?

test=# SELECT id, info FROM concat_t;
id | info
----+------
1 | A
2 | B
1 | AA
3 | C
1 | D
1 | DD
(6 rows)

test=# SELECT array_to_string(ARRAY(SELECT info FROM concat_t WHERE id = 1), ' ');
array_to_string
-----------------
A AA D DD
(1 row)

HTH
Regards.

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Jesper K. Pedersen 2006-03-11 16:58:26 Re: Merging rows into one result?
Previous Message Andreas Kretschmer 2006-03-11 16:43:37 Re: Merging rows into one result?