当我尝试执行程序时,我得到一个错误对象无效,并且我的代码是关于计算利息的,我的COD如下
crete or replace procedure cal_intr
(P number,N number,R number)
is
si number(14,2);
ci number(16,2);
begin
si:=(P*N*R)/100;
ci:=power((1+R/100),N));
ci:=P*ci;
dbms_output.put_line('simple intrest is'||si);
dbms_output.put_line('coumpound interest is'||ci);
end cal_intr;
警告:创建过程时出现编译错误。
错误是SQL> exec cal_intr(1000,2,2)BEGIN cal_intr(1000,2,2); 结束;
第1行出现错误:ORA-06550:第1行,第7列:PLS-00905:对象HR.CAL_INTR无效ORA-06550:第1行,第7列:PL / SQL:语句被忽略
我认为您在此行上的结束括号太多
i:=power((1+R/100),N));
尝试
i:=power((1+R/100),N);
并且crete
应该是create
显而易见的。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句