M
marcelohenderson
I have table "Index":
indexID;
IndexDt
Yesterday
Today
Accumulated
IndexID IndexDt Yesterday Today Acumulated
1 01/01/07 2 2
1 02/01/07 2 3 6
1 03/01/07 6 2 12
1 04/01/07 12 3 36 . . .
Yesterday = Acumulated of previous date ,if is null = 1
Acumulated= Yesterday* Today
At first day: yesterday= null then yesterday= 1 (like a neutral
factor)
if today=2
acumulated= yesterday* today = 2
second day: yesterday= acumulated of first day =2
if today-=3
acumuluated= yesterday*today = 6
third day: yesterday=acumulated of second day=6
today=2
acumulated=12 . . .
How can I make this calculation?
Regards
Apologyze for my poor english
indexID;
IndexDt
Yesterday
Today
Accumulated
IndexID IndexDt Yesterday Today Acumulated
1 01/01/07 2 2
1 02/01/07 2 3 6
1 03/01/07 6 2 12
1 04/01/07 12 3 36 . . .
Yesterday = Acumulated of previous date ,if is null = 1
Acumulated= Yesterday* Today
At first day: yesterday= null then yesterday= 1 (like a neutral
factor)
if today=2
acumulated= yesterday* today = 2
second day: yesterday= acumulated of first day =2
if today-=3
acumuluated= yesterday*today = 6
third day: yesterday=acumulated of second day=6
today=2
acumulated=12 . . .
How can I make this calculation?
Regards
Apologyze for my poor english