set serveroutput on;
------------------------------------------------
-- create a stored function
------------------------------------------------
create or replace function up_amount (v_amount number)
return number is
principal number := 0;
sumval number := 0;
cursor h_cursor is
select d_amount from deposit where d_amount > v_amount;
begin
open h_cursor;
loop
fetch h_cursor into principal;
exit when h_cursor%notfound;
sumval := sumval * 1.4;
end loop;
return sumval;
end;
/
------------------------------------------------
-- execute the stored function
------------------------------------------------
에러내용 및 테이블정보는 그림파일로 첨부하였습니다.
아무리 봐도 모르겠네요ㅠ