Re: how to use plsql to calculate compond growth
Date: 28 Dec 2003 19:59:28 -0800
Message-ID: <37032184.0312281959.286e42ef_at_posting.google.com>
Hi Jim,
Thank you for your help. I still got the same error message based on your code
Any where wrong?
Thanks
David
1 declare
ning_1898_at_yahoo.com (David) wrote in message news:<37032184.0312271915.d9d43ef_at_posting.google.com>...
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;
nli_at_HOPE1> /
SP2-0552: Bind variable "MONEY" not declared.
> I am learning plsql. I would like to run a stored procedure to
> calculate my bank account value by predicted 10% annual growth rate.
> Below is my plsql that is having problems. Your help is highly
> appreciated.
>
> Thanks
>
> declare
> money number := 50000.00;
> year number := 1;
> begin for i in 1..17
> loop
> execute immediate 'insert into my_401k values (':year', 'money + 0.10
> * money')';
> year := year + 1;
> end loop;
> end;
> /
>
>
> SP2-0552: Bind variable "YEAR" not declared.
>
> Any where wrong in this script?
>
> Thanks
Received on Mon Dec 29 2003 - 04:59:28 CET