Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Re[2]: Instead of SUM() I require MULTIPLY
yes, you can -- it just needs some coding efforts.
you can return the product (result of multiplication) of a set of numbers, you can return the concatenation of a set of strings, you can return *anything* that makes sense, based on the following assumptions:
so just use your fantasy, and then your coding skills :-) see the documentation I mentioned earlier.
note that it is sometimes non-trivial to handle all the borderline cases (like NULLs and empty sets) and to handle all exceptions/error situations properly -- but it can be done.
As you can see, Oracle SQL is very extensible!
kind regards,
Lex.
From: oracle-l-bounce_at_freelists.org [mailto:oracle-l-bounce_at_freelists.org] On
Behalf Of Yongping Yao
Sent: Sunday, December 11, 2005 12:17
To: Oracle-L Freelists
Subject: Re: Re[2]: Instead of SUM() I require MULTIPLY
Thanks all,
It's a very helpful solution. Have someone considered some similar occassion
when we have to concat values?
For example,
1 a
1 b
3 c
4 a
1 e
then we want the resultset as
1 a,b,e
3 c
4 a
I have a solution in PL/SQL. Can a simple SQL solve it? Just curious :)
On 12/11/05, Ethan Post < post.ethan_at_gmail.com <mailto:post.ethan_at_gmail.com> > wrote:
Wow, great information everyone! Thanks for the more than helpful responses.
-- http://www.freelists.org/webpage/oracle-lReceived on Sun Dec 11 2005 - 06:11:49 CST
![]() |
![]() |