![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
[...] because it runs the statement in the global context, not inside the context of the current function. |
#3
| |||
| |||
|
#4
| |||
| |||
|
|
I am looking for the PL/SQL equivalent of the VBScript Exec and/or Eval functions, i.e. I want to be able to dynamically create a statement, then execute it in the current PL/SQL context, e.g. declare x integer := 5; begin ExecuteStatement('x := 10'); dbms_output.put_line(x); -- should put "10" if EvaluateExpression('x*2 = 20') then dbms_output.put_line('Yes'); else dbms_output.put_line('No'); end if; -- should put 'Yes' end; EXECUTE IMMEDIATE doesn't seem to work, because it runs the statement in the global context, not inside the context of the current function. |
![]() |
| Thread Tools | |
| Display Modes | |
| |