pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Louis-David Mitterrand <vindex@apartia.org>
To: pgsql-sql@postgresql.org
Subject: return a text agreggate from a subselect
Date: Wed, 19 Dec 2001 17:11:28 +0100
Message-ID: <20011219161128.GB28569@apartia.org> (raw)

Hi,

I am trying to convert a subselect that has several matches into one
string comprising all matches concatenated:

The subselect: (SELECT company_name FROM table) 

The output I'd like: 'Company1|Company2|Company3|etc.'

Should I write a function or a new agreggate for this or is there is
simpler way?

Thanks in advance,

-- 
    PANOPE: On dit même qu'au trône une brigue insolente
            Veut placer Aricie et le sang de Pallante.
                                          (Phèdre, J-B Racine, acte 1, scène 4)



view thread (2+ messages)  latest in thread

Message-ID: <20011219161128.GB28569@apartia.org>
Permalink:  ../20011219161128.GB28569@apartia.org/
Also on:    postgresql.org/message-id/20011219161128.GB28569@apartia.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: vindex@apartia.org
  Subject: Re: return a text agreggate from a subselect
  In-Reply-To: <20011219161128.GB28569@apartia.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox