Re: how to use plsql to calculate compond growth
Date: Mon, 29 Dec 2003 14:23:39 GMT
Message-ID: <Xns94605F855ED46kendenny_at_216.77.188.18>
null_pointer_at_rediffmail.com (nullpointer) wrote in
news:c0728f9d.0312282347.59b6f551_at_posting.google.com:
> PL SQL autobinds so no need to specify those as bind variables
That will get around the error message, but it won't give you the results
you're looking for. Note: you never changed the value of the variable
money, so every year money is going to have 55000.00 in the moey column.
> This should work
>
> 1 declare
> 2 money number :=50000.00;
> 3 year number :=1;
> 4 begin for i in 1..17
> 5 loop insert into my_401k values(year, money + 0.1*money);
> 6 year := year +1;
> 7 end loop;
> 8* end;
>
> Hope it Helps
> nullpointer
--
Ken Denny
http://www.kendenny.com/
Received on Mon Dec 29 2003 - 15:23:39 CET