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;