Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> comp.databases.theory -> Re: is concat a group by function?

Re: is concat a group by function?

From: Mikito Harakiri <nospam_at_newsranger.com>
Date: Sat, 05 May 2001 00:21:17 GMT
Message-ID: <1IHI6.1820$vg1.151572@www.newsranger.com>

In article <%zFI6.1690$vg1.141759_at_www.newsranger.com>, Aloha Kakuikanu says...
>
>SELECT
>MGR,
>CONCAT( EMPNO ) || ','
>FROM SCOTT.EMP
>group by MGR
>
>doesn't work, of course. Any other way to do it?
>

Here is a way to group by into a collection in oracle

SELECT
MGR,
CAST(MULTISET(SELECT empno
FROM EMP e
WHERE e.mgr=m.MGR
)
AS number_list_t) ENO
FROM EMP m
group by MGR

(what a syntax!)
They'll have user defined aggregates in 9i. Received on Fri May 04 2001 - 19:21:17 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US