Using sqlplus I used to put macros inside scripts pretty much everywhere, even inside strings. I've found that this is impossible in ODAC. For instance, this script has a macro:
Code: Select all
create or replace package pkg_str is
function get_str return varchar2 deterministic;
end;
/
create or replace package body pkg_str as
function get_str return varchar2 deterministic
is begin
return 'the macro is &1';
end;
end;
/
Of course I can rewrite the script and put the macro outside the quotes ('the macro is '||&1). Apart from the loss in performance, which is not a big deal, the rewriting process becomes annoying in those scripts where I have the same macro inside AND outside quotes.
My guess is that this feature has been removed after
this bug report. Am I right?