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 -> Dynamic calculation

Dynamic calculation

From: <dead.man.walking_at_gmx.de>
Date: 27 Sep 2006 06:18:06 -0700
Message-ID: <1159363086.863048.306520@m7g2000cwm.googlegroups.com>


Hello NG!

Looks like I can't figure out how to do the following in SQL on Orcl 10g:
I'd like to do a summation of values from the 1st of jan. to a give month.

Given the following table:
Month | Value
----------|----------

Jan     | 1000
Feb     | 2000
Mar    | 800
Apr     | 600
May    | 1400
Jun     | 730
Jul      | 970

...

I want to select MONTH, VALUE, TILL_MONTH_VALUE Month | Value | Till_month_value

----------|----------|--------------------------
Jan     | 1000  | 1000
Feb     | 2000  | 3000
Mar     | 800   | 3800

...

I heard of so-called "domain-functions" in MS-Access, which migth be able to do the trick, but which also are rather slow...

So I'd like to know wether there is a passibillity to do the summation in a query (within reasonable time) or if I should rather use a table / mat. view for storing the sums.

Any ideas and opinions will be appreciated Alex Sauer Received on Wed Sep 27 2006 - 08:18:06 CDT

Original text of this message

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