Acumulated

  • Thread starter marcelohenderson
  • 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
 
M

Marshall Barton

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top