Hi All

I have stored a user defined function as Varchar field in a table.
How do I execute this function.

Here is the table where the function is stored.

SQL> select * from func;

FUNCTION_NAME
-----------------------------------------
Calc_radius(5)


This procedure contains the following Code :

create function calc_radius(r in number) return number is
begin
return 3.14*r*r;
end;

Executing this funtion at SQL Prompt give the output as

SQL> SELECT CALC_RADIUS(5) FROM DUAL;

CALC_RADIUS(5)
--------------
          78.5

I want to execute this function from a PL/SQL Block.
I tried to store this function into a variable and then execute it.
But it returns only the content of the field FUNCTION_NAME
and not the value.

Can anyone suggest a solution for this problem ?

Regards
Dpb


-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: 
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

Reply via email to