Re: query concat

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: Ricardo Javier Aranibar León <ricardo_jal(at)hotmail(dot)com>
Cc: <pgsql-sql(at)postgresql(dot)org>, <ricardo_jal(at)linuxmail(dot)org>
Subject: Re: query concat
Date: 2002-09-20 15:09:22
Message-ID: 20020920080218.W40440-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Fri, 20 Sep 2002, [iso-8859-1] Ricardo Javier Aranibar Len 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;

In response to

  • query concat at 2002-09-20 14:46:26 from Ricardo Javier Aranibar León

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2002-09-20 15:19:30 Re: timestamp parse error
Previous Message Andreas Schmitz 2002-09-20 15:06:04 Re: query concat