Received: from localhost (unknown [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id B76D59FB2C3 for ; Fri, 12 Oct 2007 12:02:33 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 17595-05 for ; Fri, 12 Oct 2007 12:02:20 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.248]) by postgresql.org (Postfix) with ESMTP id C702A9FB280 for ; Fri, 12 Oct 2007 12:02:25 -0300 (ADT) Received: by an-out-0708.google.com with SMTP id c36so49552ana for ; Fri, 12 Oct 2007 08:02:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=MEnsN1jcOWcCJcWYb10RGG5frZNnLYBAH1jiG/2Kk+U=; b=gBQ409D1OxWCIVtM4R8dGzuZpzQNwaJO6b4PTA8AiuK5Dph0wyuulBDVwoe1XWsgr9ZJghCFDQPQFXSGznNTcn8ev2J4JzuJNFpPUh+vdPZNot/eliz6SMqzoCw0nxcL6BmvF9FZk++6gXT9IfxMNNSl0eHnEsd7/ENL/620Yu8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=UmkppqAUM1Trct696kh2Pm7pwwBJi5gWt5NuCLydoOUwFWJKQX9bAw8brIaN3+r4hPE9hAnibtLN7+DBUhCBFYNhGhexGx0JoQhlp/1NbH0FlbiPEDKLmpbDik1Ha9/7lt7Ld9NkJEgkqGEgDLuRcgmt6h7qQ4zbPUn0bLf1tsM= Received: by 10.142.107.1 with SMTP id f1mr1014598wfc.1192201343365; Fri, 12 Oct 2007 08:02:23 -0700 (PDT) Received: by 10.143.8.5 with HTTP; Fri, 12 Oct 2007 08:02:23 -0700 (PDT) Message-ID: <36e682920710120802u4c8fa4c9xc7021f59c5579ba@mail.gmail.com> Date: Fri, 12 Oct 2007 11:02:23 -0400 From: "Jonah H. Harris" To: "Andreas Joseph Krogh" Subject: Re: OT: array_accum equivalent in Oracle Cc: pgsql-sql@postgresql.org In-Reply-To: <200710121616.28023.andreak@officenet.no> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200710121616.28023.andreak@officenet.no> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200710/62 X-Sequence-Number: 29434 On 10/12/07, Andreas Joseph Krogh wrote: > Anybody knows if Oracle has an equivalent of PG's array_accum or > ARRAY(subselect) construct? Something like this: CREATE TYPE varchar2_table_t AS TABLE OF VARCHAR2(32767); SELECT job, CAST(MULTISET(SELECT ename FROM emp WHERE job = e.job) AS varchar2_table_t) FROM emp e GROUP BY job; -- Jonah H. Harris, Sr. Software Architect | phone: 732.331.1324 EnterpriseDB Corporation | fax: 732.331.1301 499 Thornall Street, 2nd Floor | jonah.harris@enterprisedb.com Edison, NJ 08837 | http://www.enterprisedb.com/