Re: query concat - Mailing list pgsql-sql

From Stephan Szabo
Subject Re: query concat
Date
Msg-id 20020920080218.W40440-100000@megazone23.bigpanda.com
Whole thread Raw
In response to query concat  (Ricardo Javier Aranibar León<ricardo_jal@hotmail.com>)
List pgsql-sql
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;




pgsql-sql by date:

Previous
From: Ricardo Javier Aranibar León
Date:
Subject: query concat
Next
From: Andreas Schmitz
Date:
Subject: Re: query concat