Re: How fetch multiple rows into one text-field?

Поиск
Список
Период
Сортировка
От Joshua Tolley
Тема Re: How fetch multiple rows into one text-field?
Дата
Msg-id 20090731232935.GZ4385@eddie
обсуждение исходный текст
Ответ на How fetch multiple rows into one text-field?  (Andreas <maps.on@gmx.net>)
Список pgsql-sql
On Fri, Jul 31, 2009 at 10:09:46PM +0200, Andreas wrote:
> Hi,
>
> how can I fetch multiple rows into one text-field?
> I need the contents of some log-infos condensed into a single text to
> show in a report.

It sounds like you might want something like this:

SELECT ... array_to_string(array_accum(log_notes, '<some delimiter>')) FROM...

You might need to add array_accum manually; before 8.4 it wasn't built in.
See http://www.postgresql.org/docs/8.3/static/xaggr.html

--
Joshua Tolley / eggyknap
End Point Corporation
http://www.endpoint.com

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

Предыдущее
От: Andreas
Дата:
Сообщение: How fetch multiple rows into one text-field?
Следующее
От: Heigo Niilop
Дата:
Сообщение: SELECT max() group by problem