public inbox for [email protected]
help / color / mirror / Atom feedFrom: Jim C. Nasby <[email protected]>
To: [email protected]
Subject: Turning a subselect into an array
Date: Thu, 28 Oct 2004 17:37:29 -0500
Message-ID: <[email protected]> (raw)
I'm sure this has been answered before, but the search seems to be down
again.
How can I convert the results of a subselect into an array? IE:
CREATE TABLE a(a int, b int, c int[]);
INSERT INTO table_a
SELECT a, b, (SELECT c FROM table_c WHERE table_c.parent = table_b.id)
FROM table_b
;
--
Jim C. Nasby, Database Consultant [email protected]
Give your computer some brain candy! www.distributed.net Team #1828
Windows: "Where do you want to go today?"
Linux: "Where do you want to go tomorrow?"
FreeBSD: "Are you guys coming, or what?"
view thread (5+ messages) latest in thread
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: [email protected]
Cc: [email protected], [email protected]
Subject: Re: Turning a subselect into an array
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox