I would like to execute pl sql query below and get result of the comparison.
EXECUTE IMMEDIATE 'select 5<6 FROM DUAL' ;
Executing error is something like below:
ORA-06550: line 1, column 18:
PLS-00103: Encountered the symbol "select 5<6 FROM DUAL" when expecting one of the following:
:= . ( @ % ;
The symbol ":=" was substituted for "select 5<6 FROM DUAL" to continue.
06550. 00000 - "line %s, column %s:\n%s"
*Cause: Usually a PL/SQL compilation error.
*Action
:
My math operator between two numbers is dynamic , meaning it can be any other operator like < , > , <=, >=, = etc. And it comes from parameter to my stored procedure.
For Instance :
There is 3 in parameters in my SP.
number1 , number2 and math operator.
Actually what am ı looking for is somith like eval() function in javascript which is automatically execute string operation and return its result . Eval("5<3")