posted 18 years ago
after executing :
declare
pi constant number(5,4) := 3.141;
area number(14,2);
cursor rad_cursor is select * from Radius_vals;
rad_val rad_cursor%ROWTYPE;
begin
open rad_cursor;
loop
fetch rad_cursor into rad_val;
exit when rad_cursor%NOTFOUND;
area := pi * power(rad_val.radius,2);
case
when rad_val.radius = 3
then insert into areas values(rad_val.radius,area);
when rad_val.radius = 4
then insert into areas values(rad_val.radius,area);
when rad_val.radius = 10
then insert into areas values(0,0);
else raise CASE_NOT_FOUND;
end case;
end loop;
close rad_cursor;
end;
this code I got out put:
declare
*
ERROR at line 1:
ORA-06592: CASE not found while executing CASE statement
ORA-06512: at line 19
how can I fix this error.