pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Volkan YAZICI <yazicivo@ttnet.net.tr>
To: Jesper K. Pedersen <jkp@solnet.homeip.net>
Cc: pgsql-sql@postgresql.org
Subject: Re: Merging rows into one result?
Date: Sat, 11 Mar 2006 18:48:00 +0200
Message-ID: <20060311164800.GA218@alamut> (raw)
In-Reply-To: <20060311173133.1358a018@io.solnet>
References: <20060311173133.1358a018@io.solnet>

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.



view thread (5+ messages)  latest in thread

Message-ID: <20060311164800.GA218@alamut>
Permalink:  ../20060311164800.GA218@alamut/
Also on:    postgresql.org/message-id/20060311164800.GA218@alamut

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: yazicivo@ttnet.net.tr, jkp@solnet.homeip.net
  Subject: Re: Merging rows into one result?
  In-Reply-To: <20060311164800.GA218@alamut>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox