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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Getting strange result when using analytic function to calculate running sum.

Re: Getting strange result when using analytic function to calculate running sum.

From: HKLN <hkln_at_hkln.net>
Date: 20 Aug 2005 23:27:31 -0700
Message-ID: <1124605651.797221.13070@g14g2000cwa.googlegroups.com>


Mark Bole wrote:
> HKLN wrote:
> >
> > If I want to show 7875 for SCOTT's salary, how should I write the SQL?
> >
>
> Try this for line 4:
>
> ORDER BY SAL, EMPNO
>
> -Mark Bole

Thank you very much, Mark. I found that answer in the documentation:

"Note: Whenever the order_by_clause results in identical values for multiple rows, the function returns the same result for each of those rows. Please refer to the analytic example for SUM for an illustration of this behavior."

I am careless to miss the note.

Cheers,

HKLN Received on Sun Aug 21 2005 - 01:27:31 CDT

Original text of this message

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