Hi,
I want to create a directory at runtime. This is my PL/SQL code:
1 DECLARE
2 h_var VARCHAR2(20) := 'C:\images\';
3 BEGIN
4 -- EXECUTE IMMEDIATE 'CREATE directory "image_dir" as ''C:\images\'' ';
5 EXECUTE IMMEDIATE 'CREATE directory "image_dir" as || help ';
6 END;
7 /
I get the following error message:
ERROR at line 1:
ORA-01780: string literal required
ORA-06512: at line 5
Does anybody know how the correct syntax is? When I comment out line 5 instead of line 4, it works fine, but I need to have a variable for the directory name...
Many thanks,
Jeron
I want to create a directory at runtime. This is my PL/SQL code:
1 DECLARE
2 h_var VARCHAR2(20) := 'C:\images\';
3 BEGIN
4 -- EXECUTE IMMEDIATE 'CREATE directory "image_dir" as ''C:\images\'' ';
5 EXECUTE IMMEDIATE 'CREATE directory "image_dir" as || help ';
6 END;
7 /
I get the following error message:
ERROR at line 1:
ORA-01780: string literal required
ORA-06512: at line 5
Does anybody know how the correct syntax is? When I comment out line 5 instead of line 4, it works fine, but I need to have a variable for the directory name...
Many thanks,
Jeron