Skip to Main Content

Oracle Database Discussions

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 in Procedure

769729May 4 2010 — edited May 4 2010
Hi Guys,

Any one please help i am getting an error during creating directory in procedure. Below is the code and error

I am using windows XP, oracle 10g, sql developer and sql plus.

code: -

create or replace
procedure checking as
filing UTL_File.File_Type;
create or replace directory dir as 'c:\temp';
begin

filing := UTL_File.Fopen(dir,'check.txt','w');

UTL_File.put_line(filing, 'Test');

UTL_File.FClose(filing);

End;

error
Error(5,1): PLS-00103: Encountered the symbol "CREATE" when expecting one of the following: begin function package pragma procedure subtype type use <an identifier> <a double-quoted delimited-identifier> form current cursor

Thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 1 2010
Added on May 4 2010
12 comments
3,690 views