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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Re[2]: Instead of SUM() I require MULTIPLY

Re: Re[2]: Instead of SUM() I require MULTIPLY

From: Yongping Yao <yaoyongping_at_gmail.com>
Date: Sun, 11 Dec 2005 21:20:59 +0800
Message-ID: <706468990512110520n3108ba63y69258036ec54e1a7@mail.gmail.com>


Thanks lex de Haan,I'll try it.

On 12/11/05, Lex de Haan <lex.de.haan_at_naturaljoin.nl> wrote:
>
> 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:
>
> - the input is a set of values (of a certain data type)
> - your code does *something* with those values
> - the output is a single value; your code determines *which* value
>
> 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.
>
> ---------------------------------------------------------------------
> Jonathan Lewis Seminar http://www.naturaljoin.nl/events/seminars.html
> ---------------------------------------------------------------------
>
> ------------------------------
> *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> wrote:
> >
> > Wow, great information everyone! Thanks for the more than helpful
> > responses.
>
>
>

--
Yao Yongping
Learning Oracle, UNIX/Linux...
Love Reading, Classical Music, Philosophy, Economics etc.
Blog: http://blog.csdn.net/ern
         http://spaces.msn.com/members/yaoyp/

--
http://www.freelists.org/webpage/oracle-l
Received on Sun Dec 11 2005 - 07:21:05 CST

Original text of this message

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