Microsoft
Software
Hardware
Network
Question : cumulative sums
Hello, I have a table in oracle 10.2 with the following structure:
tt_balance_acum(
cod_empresa number not null enable,
cod_oficina number not null enable,
cod_cuenta varchar2( 32 byte ) not null enable,
fec_corte date,
fec_fin_mes date,
fec_fin_año date,
saldo number( 19, 2 ) default 0 )
this is a sample data:
1 255 1000000000 01-JAN-2005 31-JAN-2005 31-DEC-2005 24377161.83
1 255 1000000000 03-JAN-2005 31-JAN-2005 31-DEC-2005 24473060.42
1 255 1000000000 04-JAN-2005 31-JAN-2005 31-DEC-2005 24663020.54
1 255 1000000000 05-JAN-2005 31-JAN-2005 31-DEC-2005 24622068.1
1 255 1000000000 06-JAN-2005 31-JAN-2005 31-DEC-2005 24623397.32
1 255 1000000000 01-FEB-2005 28-FEB-2005 31-DEC-2005 24627780.39
1 255 1000000000 02-FEB-2005 28-FEB-2005 31-DEC-2005 24851049.34
1 255 1000000000 03-FEB-2005 28-FEB-2005 31-DEC-2005 24701121.18
1 255 1000000000 04-FEB-2005 28-FEB-2005 31-DEC-2005 24878186.19
1 255 1000000000 09-FEB-2005 28-FEB-2005 31-DEC-2005 24700391.67
1 255 1000000000 10-FEB-2005 28-FEB-2005 31-DEC-2005 24693361.77
1 255 1000000000 01-MAR-2005 31-MAR-2005 31-DEC-2005 25099924.36
1 255 1000000000 02-MAR-2005 31-MAR-2005 31-DEC-2005 25344461.78
1 255 1000000000 03-MAR-2005 31-MAR-2005 31-DEC-2005 25229635.86
1 255 1000000000 04-MAR-2005 31-MAR-2005 31-DEC-2005 25148029.08
1 255 1000000000 07-MAR-2005 31-MAR-2005 31-DEC-2005 25206505.98
1 255 1000000000 08-MAR-2005 31-MAR-2005 31-DEC-2005 25257520.6
I need to calculate the accrued for the column "saldo", for the previous date, for the current month, for the previous month, for the current quarter, for the previous quarter for the current year and the previous year
Answer : cumulative sums
Can you find the group using ADSIedit?
Random Solutions
Error ORA-1722 when DAO is writing data to an Oracle 11g database
Is it possible to automatically copy data from AS/400 to Excel (or Lotus 1-2-3) without external apps?
Win RAR
Reverse DNS Centos 5, Bind. shared hosting
Datalist reset all its items when OnItemCommand is fired
capture sp_depends into temptable
ASP.NET LinQ Look up
How to display KML file on a Google Map?
basic question about graphs and gradients
SCCM OSD deployment to Hyper-v R2