Why am I getting this error? What has to be changed?
SQL> declare
2 pi constant number(9,7) := 3.1415927;
3 area number (14,2);
4 cursor rad_cursor is
5 select * from radius_vals;
6 rad_val rad_cursor%ROWTYPE;
7 begin
8 open rad_cursor;
9 fetch rad_cursor into rad_val;
10 area =: pi*power(rad_val.radius,2);
11 insert into areas values (rad_val.radius, area);
12 close rad_cursor;
13 end;
14 /
SP2-0552: Bind variable "PI" not declared.
SQL> declare
2 pi constant number(9,7) := 3.1415927;
3 area number (14,2);
4 cursor rad_cursor is
5 select * from radius_vals;
6 rad_val rad_cursor%ROWTYPE;
7 begin
8 open rad_cursor;
9 fetch rad_cursor into rad_val;
10 area =: pi*power(rad_val.radius,2);
11 insert into areas values (rad_val.radius, area);
12 close rad_cursor;
13 end;
14 /
SP2-0552: Bind variable "PI" not declared.