I need to create a directory depending on the path ( for example it will be /export/home/'camsdocd/meterwatch for development , /export/home/'camsdocq/meterwatch for QA and/export/home/'camsdocp/meterwatch for production
Here is what I thought but I am getting the error below
declare
v_camsdoc v$instance.instance_name%type;
v_stmt varchar2(1000);
begin
select instance_name
into v_camsdoc
from v$instance;
v_stmt := 'CREATE OR REPLACE DIRECTORY METERWATCH AS /export/home/'||v_camsdoc||'/meterwatch';
execute immediate v_stmt;
end;
Error at line 1
ORA-01780: string literal required
ORA-06512: at line 9