From: Andreas <maps.on@gmx.net>
To: pgsql-sql@postgresql.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> (raw)
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
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: maps.on@gmx.net
Subject: Re: How fetch multiple rows into one text-field?
In-Reply-To: <4A734F8A.906@gmx.net>
* 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