Evaluate Expression from PL/SQL without passing it SQL engine
705443Jun 5 2009 — edited Jun 9 2009I have an expression similar to '1+2+(3*6)/12*ROUND(10*3, 3)' which I generate programatically in VARCHAR2 variable. One way to calculate the expression is execute immediate 'select '||exp||' from dual' into lv_x; which would return the value. But my shared pool is filling up as I do this thousands of times may more in some cases. I unsuccessfully tried to use bind variables.
1. Is there a way to temporarily turn shared pool off before the query an enable it after executing the query?
2. Is there a simple function in PL/SQL which evaluvates the expression? If not I may have to painfully write one.
Please advice