Re: Re[2]: Instead of SUM() I require MULTIPLY
- From: Yongping Yao <yaoyongping@xxxxxxxxx>
- To: Oracle-L Freelists <Oracle-L@xxxxxxxxxxxxx>
- Date: Sun, 11 Dec 2005 21:20:59 +0800
Thanks lex de Haan,I'll try it.
On 12/11/05, Lex de Haan <lex.de.haan@xxxxxxxxxxxxxx> 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@xxxxxxxxxxxxx [mailto:
> oracle-l-bounce@xxxxxxxxxxxxx] *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@xxxxxxxxx> 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/
- References:
- Re: Re[2]: Instead of SUM() I require MULTIPLY
- From: Yongping Yao
- RE: Re[2]: Instead of SUM() I require MULTIPLY
- From: Lex de Haan
Other related posts:
- » Re: Re[2]: Instead of SUM() I require MULTIPLY
- » Re: Re[2]: Instead of SUM() I require MULTIPLY
- » RE: Re[2]: Instead of SUM() I require MULTIPLY
- » Re: Re[2]: Instead of SUM() I require MULTIPLY
- » RE: Re[2]: Instead of SUM() I require MULTIPLY
- » RE: Re[2]: Instead of SUM() I require MULTIPLY
- » RE: Re[2]: Instead of SUM() I require MULTIPLY
- » Re: Re[2]: Instead of SUM() I require MULTIPLY
- Re: Re[2]: Instead of SUM() I require MULTIPLY
- From: Yongping Yao
- RE: Re[2]: Instead of SUM() I require MULTIPLY
- From: Lex de Haan