From: Andrei Bintintan <klodoma@ar-sd.net>
To: pgsql-sql@postgresql.org
Subject: SQL query --- big question???
Date: Fri, 12 Mar 2004 16:36:14 +0200
Message-ID: <007e01c4083f$5fb78100$0b00a8c0@forge> (raw)
Hi to all,
I have a big question.
Can I write a query/function/agregate function (whatever) so that I can return the result of a query in a single line? I don't know if this is possible to be made and please if it is not possible please say.
I better give an example:
table (id, name)
1 xxx
2 yyy
3 zzz
Now I want to have a query like:
Select id from table
and the result to be something like: 1,2,3
and not 1 2 3 in different lines.
I just want to concatenate the results in a single result so this query result will have 1 row and 1 column. This looks like an agregate function but I don't know how to make this.
I hope you will understand what I want to do.
Please advise.
Thnx.
Andy.
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: klodoma@ar-sd.net
Subject: Re: SQL query --- big question???
In-Reply-To: <007e01c4083f$5fb78100$0b00a8c0@forge>
* 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