Quantcast
Channel: Teradata Forums - Database
Viewing all articles
Browse latest Browse all 14773

Loops without using procedures - forum topic by rajimol

$
0
0

Hi
I have a scenario like we need to  calculate premium amount for a perticular year.
 

if the year in integer for eg 4

 

 

 

 

 

 

 

 

 

 

 

 

Year

 

amt

 

 

 

 

 

 

 

 

 

 

 

1

 

amt/(1+rt_fct)

 

 

 

2

 

(amt*(1+rt_incr_fct)*1)/(1_rt_fct)^2)

 

3

 

(amt*(1+rt_incr_fct^2)*1)/(1_rt_fct)^3)

 

4

 

(amt*(1+rt_incr_fct^3)*1)/(1_rt_fct)^4)

 

 

 

 

 

 

 

If the year In decimal like 3.8 then

 

 

 

 

Year

 

amt

 

 

 

 

 

 

 

 

 

 

 

1

 

amt/(1+rt_fct)

 

 

 

2

 

(amt*(1+rt_incr_fct)*1)/(1_rt_fct)^2)

 

3

 

(amt*(1+rt_incr_fct^2)*1)/(1_rt_fct)^3)

 

4

 

(amt*(1+rt_incr_fct^3)*.8)/(1_rt_fct)^4)
 
 

 Assume amt from one table,Year from another,And the other attributes from one table.the max year in db is 20.I tried with procedures. But its showing an error like no more room in database.is there any other way to do this without using procedures. Can you please help me??
 

Forums: 

Viewing all articles
Browse latest Browse all 14773

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>