Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Create directory from procedure using IN parameter-Directory name with path

529772Oct 31 2008 — edited Oct 31 2008
Hi,
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.
This post has been answered by Gurjas on Oct 31 2008
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 28 2008
Added on Oct 31 2008
6 comments
403 views