Hi ,
Can we pass command line arguments to a PL/SQL block which is written in .SQL file?
Thanks a lot!
Rajesh
Printable View
Hi ,
Can we pass command line arguments to a PL/SQL block which is written in .SQL file?
Thanks a lot!
Rajesh
Is this what you mean?
undefine mystring
begin
select &&mystring from dual;
end;
/
yes, just use &1, &2 etc
&1 would be the first argument
for example if you have your pl/sql block in a *.sql you could do
@xxx.sql myarg1 myarg2
&1 and &2 will take care of rest
if you want to store &1 and &2 during the session you should use &&1, &&2