Re: [SQL] OT: array_accum equivalent in Oracle

2007-10-12 Thread Jonah H. Harris
On 10/12/07, Andreas Joseph Krogh <[EMAIL PROTECTED]> wrote: > > 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; > > Amazing! Works like a

Re: [SQL] OT: array_accum equivalent in Oracle

2007-10-12 Thread Andreas Joseph Krogh
On Friday 12 October 2007 17:02:23 Jonah H. Harris wrote: > On 10/12/07, Andreas Joseph Krogh <[EMAIL PROTECTED]> 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 VARCHAR

Re: [SQL] OT: array_accum equivalent in Oracle

2007-10-12 Thread Jonah H. Harris
On 10/12/07, Andreas Joseph Krogh <[EMAIL PROTECTED]> 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 =

[SQL] OT: array_accum equivalent in Oracle

2007-10-12 Thread Andreas Joseph Krogh
WARNING: The rest of this post is for somebody who has worked with Oracle and has migrated to PG, or for some other reason has good experience with Oracle. I know this is off-topic for this list and should be asked in an Oracle support-forum, but I don't have access to that, and Uncle Google did