Re: Select rotate in PostgreSql

From: Merlin Moncure <mmoncure(at)gmail(dot)com>
To: Andre Lopes <lopes80andre(at)gmail(dot)com>
Cc: postgresql Forums <pgsql-general(at)postgresql(dot)org>
Subject: Re: Select rotate in PostgreSql
Date: 2013-03-13 13:38:20
Message-ID: CAHyXU0xxwjXXT7HGMUOAHyg+V+VqQQHHeBfEih-quL7CWn90uA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Mar 13, 2013 at 8:32 AM, Andre Lopes <lopes80andre(at)gmail(dot)com> wrote:
> Hi all,
>
> I don't know how to ask for this. I need to rotate a Select in
> PostgreSql, just like this: http://dpaste.com/1021691/
>
> I can achieve this easily without a procedure?

yes: that's not rotation but simple aggregation. look for string_agg
here: http://www.postgresql.org/docs/9.2/static/functions-aggregate.html

merlin

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Fabrízio de Royes Mello 2013-03-13 13:38:51 Re: Select rotate in PostgreSql
Previous Message Raymond O'Donnell 2013-03-13 13:36:01 Re: C++Builder table exist