Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: user defined aggregate functions
In article <9a9a651.0108291629.3a3012f2_at_posting.google.com>,
felixnaumann_at_hotmail.com says...
>
>Hi,
>
>is it possible to create user defined aggregate functions?
>
>Just to clarify and point out the difference to other
>posting in this group:
>- I do not mean scalar functions that do aggregation.
>- I do not mean work arounds such as those suggested for
> the PRODUCT aggregate function.
>
>For instance, I would like to submit a query
>
>SELECT isbn, RANDOM(title)
>FROM books
>GROUP BY isbn
>
>where RANDOM() returns a random title for each group
>of books.
>
>or
>
>SELECT title, CONCAT(description)
>FROM books
>GROUP BY title
>
>where CONCAT() concatenates all descriptions into
>one long description.
>
>Thanks for your help,
>Felix
in 9i -- yes
in 8i and before -- no
see
for a 9i example (it actually does your concat function).
-- Thomas Kyte (tkyte@us.oracle.com) http://asktom.oracle.com/ Expert one on one Oracle, programming techniques and solutions for Oracle. http://www.amazon.com/exec/obidos/ASIN/1861004826/ Opinions are mine and do not necessarily reflect those of Oracle CorpReceived on Wed Aug 29 2001 - 20:13:27 CDT