Read a .csv file which has more than 45000 Characters [message #605200] |
Wed, 08 January 2014 00:14 |
|
sivakarthick
Messages: 3 Registered: January 2014 Location: chennai
|
Junior Member |
|
|
Hi all,
Iam a receiving a .CSV file which contains n number of rows ,each row has a data seperated with delimiter.
These values based on delimiter it is seperated and certain validations are handled.
Iam using UTL_FILE.GET_LINE operator to read the value and store it in a variable which is declared as l_text VARCHAR2(30000).
when we receive a line which contains huge characters say 45000 then it throws an error(Unable to read the file).
Only on rare cases we used to receive these kind of files with huge size.
Kindly help to solve this issues.
Database details.
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
PL/SQL Release 11.2.0.2.0 - Production
CORE 11.2.0.2.0 Production
TNS for Linux: Version 11.2.0.2.0 - Production
NLSRTL Version 11.2.0.2.0 - Production
Hereby i have tried with long Raw data type but still same error unable to read the file.pls find the sample code below,
declare
l_text LONG RAW;
l_importTypeFile UTL_FILE.FILE_TYPE ;
begin
PKG_COMMON.PROC_FOPEN(g_Directory, P_FILENAME, 'RB',l_importTypeFile, p_error_cd, p_error_msg) ;
UTL_FILE.GET_RAW(l_ImportTypeFile,l_Text);
End;
Thanks in Advance
Siva
|
|
|
|
|
|
|
|
|
|