Acumulated

  • Thread starter Thread starter marcelohenderson
  • Start date Start date
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
 
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?


Please do not post the same question multiple times. You
have several responses to this question yesterday. If you
need further help with it, please explain what you have done
and what it is doing or not doing in a followup question to
the same thread.
 
Back
Top