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!

invalid directory path

hemuMar 8 2016 — edited Mar 8 2016

hi

i am trying as below

SQL> CREATE OR REPLACE DIRECTORY hrk_new as 'g:\hemant';

Directory created.

  1   DECLARE

  2     HRK_NEW VARCHAR2(100):='G:\HEMANT';

  3     file_name varchar2(100) := 'ach08032016.txt';

  4     file utl_file.file_type;

  5     cursor PnJD_cur is

  6  SELECT * FROM D180003

  7   ;

  8   BEGIN

  9     file := utl_file.fopen(HRK_NEW,file_name||'.csv','w');

10     FOR v_pnjd IN PnJD_cur

11     LOOP

12          utl_file.put_line(file, v_pnjd.CITYCODE);

13     END LOOP;

14     utl_file.fclose(file);

15*  END;

SQL> /

DECLARE

*

ERROR at line 1:

ORA-29280: invalid directory path

ORA-06512: at "SYS.UTL_FILE", line 41

ORA-06512: at "SYS.UTL_FILE", line 478

ORA-06512: at line 9

what wrong is being done here?

This post has been answered by Paulzip on Mar 8 2016
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 5 2016
Added on Mar 8 2016
12 comments
2,412 views