Wednesday, April 10, 2013

Evaluate with procedures



Evaluate with Procedures

Evaluate can be used only with function. Since Evaluate is expected a value to be returned.

Workaround:  Now to use Evaluate with a Procedure; we can have a wrapper function which calls this procedure.

Sample Function :

 Evaluate('function_1(%1)', Tab_Name.Col_Name);


Function function_1(PARAM_1 VARCHAR2) return NUMBER
 Begin
    proc_1(PARAM_1);
   return 1;
 end f1;

Procedure proc_1(Param_1 varchar2)
As
Begin
 /*
  Code to achieve some functionality
 */
end p1;

-----------------------

No comments:

Post a Comment