Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Newbie question: Read text file from PL/SQL or SQLPlus

Re: Newbie question: Read text file from PL/SQL or SQLPlus

From: Frank <fbortel_at_nescape.net>
Date: Sun, 14 Dec 2003 18:44:12 +0100
Message-ID: <bri70k$itu$1@news2.tilbu1.nb.home.nl>


Ubiquitous wrote:

> In article <2ZAhb.7432$qK1.6149673_at_news2.news.adelphia.net>, Baz_at_no-spam.com 
> wrote:
> 
> 

>>Problem:
>>-----------
>>I would like to read a list of IDs from a text file on the client machine
>>and fetch records for those IDs from the database. The client is a win2k
>>machine with SQLPlus and TOAD. installed on it. The database is on a unix
>>server.
>>-------------
>>
>>[...]
>>
>>CREATE OR REPLACE PROCEDURE test_read
>>IS
>>file_handle UTL_FILE.FILE_TYPE;
>>l_text varchar2(100);
>>BEGIN
>>file_handle : = UTL_FILE.FOPEN('c:\temp', 'temp.txt', 'R');
>>LOOP
>> utl_file.get_line(file_handle, l_text);
>> dbms_output.put_line(l_text);
>>END LOOP;
>>utl_file.fclose(file_handle);
>>end;
>>
>>I get the following error:
>>ORA-29280: invalid directory path
>>ORA-06512: at "SYS.UTL_FILE"
> 
> 
> Is there really a directory "C:\temp" on the server? Perhaps adding the
> standard UTL_FILE EXCEPTION statements would help clarify things?
> 

Don't think so - it's a Unix box, according to the original thread.

-- 
Regards, Frank van Bortel
Received on Sun Dec 14 2003 - 11:44:12 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US