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

Home -> Community -> Usenet -> c.d.o.server -> Re: A bit more complicated than that

Re: A bit more complicated than that

From: Andy Hassall <andy_at_andyh.co.uk>
Date: Mon, 13 Jan 2003 22:13:08 +0000
Message-ID: <jbe62vsobv2i0de7679ns4evdp5l5lionn@4ax.com>


On 12 Jan 2003 21:57:29 -0600, tyutuyt_at_gfd.com (sfdsf) wrote:

>its not just a runnin total. in your example the amount is set just for the
>1st year i.e. year 1 = 3. the the amount for year 2 would be 3 + something
>(say 2) giving 5
>
>year amouint tax total
>
>1 3 2 5
>2 5 2 7
>3 7 1 8
>
>see how the total for row 1 becomes amount for year 2/

 Sounds like LAG() is what you're after? Gives you access to values in 'previous' rows.

http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96540/functions56a.htm#SQLRF00652

--
Andy Hassall (andy@andyh.co.uk) icq(5747695) http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space | disk usage analysis tool
Received on Mon Jan 13 2003 - 16:13:08 CST

Original text of this message

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