From: Stephan Szabo <sszabo@megazone23.bigpanda.com>
To: Ricardo Javier Aranibar León <ricardo_jal@hotmail.com>
Cc: pgsql-sql@postgresql.org
Cc: ricardo_jal@linuxmail.org
Subject: Re: query concat
Date: Fri, 20 Sep 2002 08:09:22 -0700 (PDT)
Message-ID: <20020920080218.W40440-100000@megazone23.bigpanda.com> (raw)
In-Reply-To: <F9ao8KK8ZtP0kvdIBir000092c1@hotmail.com>
On Fri, 20 Sep 2002, [iso-8859-1] Ricardo Javier Aranibar León wrote:
> Hi List,
> First, Thanks for your colaboration Richard Huxton "Do a search on aggregate
> functions and "concat" in the mailing list archives,
> also see the Postgresql Cookbook on techdocs.postgresql.org, I think there
> might be something there for you."
>
> I have been written this mail because I din't find the solution for my
> problem.
For example, an aggregate like:
http://www.brasileiro.net/postgres/cookbook/view-one-recipe.adp?recipe_id=139
(available in the aggregates section of the cookbook - note there's a bug
and you need to double the quotes around the ', ')
Then you can use a left join and the comma aggregate, something like:
select ticket.numtti, ticket.tt, ticket.usuario, ticket.estado,
comma(order_respuesta.numorden)
from ticket left outer join orden_respuesta on (tti=numtti)
group by ticket.numtti, ticket.tt, ticket.usuario, ticket.estado;
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: sszabo@megazone23.bigpanda.com, ricardo_jal@hotmail.com, ricardo_jal@linuxmail.org
Subject: Re: query concat
In-Reply-To: <20020920080218.W40440-100000@megazone23.bigpanda.com>
* 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