Quantcast
Channel: Teradata Forums - All forums
Viewing all articles
Browse latest Browse all 100

Compute with immediate previous row value derived - response (1) by abhishek.jadhav

$
0
0

Let say your table has first record (2016-11-01, 1000) then you can run the below SQL once everyday which will calculate new Amount and insert it into the same table.

 

INS into dbname.Amt_tbl

Sel Date,(((Amount*0.1)+Amount)+Amount) from dbname.Amt_tbl where logdate In (Sel max(logdate) from dbname.Amt_tbl);


Viewing all articles
Browse latest Browse all 100

Trending Articles