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.

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
       choose an index scan if your joining column's datatypes do not
       match

Reply via email to