jl66
asked on
dynamic query execution issue with a variable: in pl/sql procedure to create a directory
Want to create a directory in a PL/SQL procedure. If I don't consider the variable in the string to create the directory, it worked. However I have to consider the variable. For example,
declare
v_str varchar2(6) := 'cat1';
begin
v_sqltx := 'create or replace directory WK_DIR as ''c:\temp\''||v_str';
execute immediate (v_sqltx );
end;
/
It did not work. Can any gurus offer some advice?
declare
v_str varchar2(6) := 'cat1';
begin
v_sqltx := 'create or replace directory WK_DIR as ''c:\temp\''||v_str';
execute immediate (v_sqltx );
end;
/
It did not work. Can any gurus offer some advice?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER