Re: Re: plpgsql, I have a solution, want to see if there is a cleaner/better one. Taking vertical list and comma separating it onto a row

From: Henry Drexler <alonup8tb(at)gmail(dot)com>
To: Thomas Kellerer <spam_eater(at)gmx(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Re: plpgsql, I have a solution, want to see if there is a cleaner/better one. Taking vertical list and comma separating it onto a row
Date: 2011-11-10 13:42:08
Message-ID: CAAtgU9QKy29ZzTuiZTjuK50QOZxVp-ATpzrw=+g7S3+qsj_zJw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Nov 10, 2011 at 8:34 AM, Thomas Kellerer <spam_eater(at)gmx(dot)net> wrote:

>
>>
> SELECT type,
> string_agg(color, ',') as organized_by_type
> FROM clothes
> GROUP BY type;
>
>
>
wow, yes that is cleaner.

Thank you for taking the time - obviously I need to read through the string
functions again.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David Johnston 2011-11-10 14:29:18 Re: plpgsql, I have a solution, want to see if there is a cleaner/better one. Taking vertical list and comma separating it onto a row
Previous Message Thomas Kellerer 2011-11-10 13:34:47 Re: plpgsql, I have a solution, want to see if there is a cleaner/better one. Taking vertical list and comma separating it onto a row