Home » SQL & PL/SQL » SQL & PL/SQL » varchar2 too long to read?
varchar2 too long to read? [message #38540] Thu, 25 April 2002 09:32 Go to next message
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;
Re: varchar2 too long to read? [message #38541 is a reply to message #38540] Thu, 25 April 2002 10:52 Go to previous message
Wolfgan
Messages: 1
Registered: April 2002
Junior Member
The maximum size of an input record is 1023 bytes.
See more in:

Previous Topic: how to generate sequence number?
Next Topic: Re: how to retrieve top 3 salaries
Goto Forum:
  


Current Time: Wed Apr 24 07:20:15 CDT 2024