String aggregate function

Поиск
Список
Период
Сортировка
От Objectz
Тема String aggregate function
Дата
Msg-id 000301c2ec5b$6380ce00$aea067d4@eg1opwxp107
обсуждение исходный текст
Ответ на Re: Create function statement with insert statement  (Andreas Schmitz <a.schmitz@cityweb.de>)
Список pgsql-sql
Hi all,

I want to make an aggregate function that concatenates strings from a
certain column into one cell in a group by clause.
For example I have the following table :

Type        Text    
=================    
1        text1
2        text2
1        text3
3        text4
2        text5

I need a query that group by type and concats the text columns to
produce something like the following :

1        text1, text3
2        text2, text5
3        text4

I am aware that this can be done through recursive joins but this is too
complicated and heavy.

Any suggestions?

Regards




В списке pgsql-sql по дате отправления:

Предыдущее
От: Joost Witteveen
Дата:
Сообщение: create index right after create table not working?
Следующее
От: Manfred Koizar
Дата:
Сообщение: Re: create index right after create table not working?