varchar2 too long to read? [message #38540] |
Thu, 25 April 2002 09:32 |
Daniel Tsai
Messages: 8 Registered: November 2001
|
Junior Member |
|
|
Dear,
I am trying to use Utl_file package to read text files into Oracle. It keeps giving me read error. It the text file too long to read? The text file is 2002 bytes big and one line only. Does it matter that the text file is unix format and Oracle is Windows system?
-----------
PROCEDURE READ_FTP (p_File IN VARCHAR2)
IS
in_str VARCHAR2(32760) := ' ';
filein UTL_FILE.FILE_TYPE;
BEGIN
filein := UTL_FILE.FOPEN('d:flatfile', p_File, 'R');
LOOP
BEGIN
UTL_FILE.GET_LINE(filein,in_str);
DBMS_OUTPUT.PUT_LINE(in_str);
end;
end loop;
exception
WHEN UTL_FILE.READ_ERROR THEN
DBMS_OUTPUT.PUT_LINE('READ ERROR');
end;
|
|
|
|