How fetch multiple rows into one text-field?
- From: Andreas <maps(dot)on(at)gmx(dot)net>
- To: pgsql-sql(at)postgresql(dot)org
- Subject: How fetch multiple rows into one text-field?
- Date: Fri, 31 Jul 2009 22:09:46 +0200
- Message-id: <4A734F8A.906@gmx.net> <text/plain>
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.
There is a log with a single record per event.
The log is like this (log_id, case_id, log_date, log_category, log_notes)
I need a date-ordered list of log-date, -category, -notes of all
log-events of the same case-id like
log_date || ' ' || log_category || ' : ' || log_nots
e.g.
20.07.2009 Category 17 : utterly noteworthy notes
21.07.2009 Category 42 : lots more
22.07.2009 Category 17 : still more drivel
The report consists of a couple of case-infos and should look like
case_id, case_name, case_all_log_events
Is there a way to do this?
regards
andreas
Home |
Main Index |
Thread Index