Create directory from procedure using IN parameter-Directory name with path
529772Oct 31 2008 — edited Oct 31 2008Hi,
I wrote a procedure which takes directory name(C:\temp) as IN parameter and create oracle directory using EXECUTE IMMEDIATE by the procedure. Proc compiled fine but when i try to execute it (exec prc_lx_e_m_fund_activty ('C:\interface','test1.txt','20040102') , i am getting the following error with the execute immediate statement mentioned below.
create or replace
PROCEDURE prc_lx_e_m_fund_activty
(
i_output_dir IN VARCHAR2,
i_output_file_name IN VARCHAR2,
i_interface_date IN VARCHAR2
)
AS
.
.
.
.
EXECUTE IMMEDIATE 'CREATE OR REPLACE DIRECTORY OUTPUT_PATH AS ' || ''''||i_output_dir||'''' ||';'; -- Where i_output_dir=C:\temp (I am passing this parameter as IN)
.
.
.
END
ORA-01481: invalid number format model
ORA-06512: at "DBO.PRC_LX_E_M_FUND_ACTIVTY", line 326
ORA-00911: invalid character
ORA-06512: at line 10
Process exited.
Regards,
Nagarjun.