Characters limit in utl_file.put_line()
694157Jul 13 2009 — edited Jul 14 2009Hi guys
I am trying to ult_file.put_line a long string ~maximum 5000 characters to a file. I think i have exccess the default limit and receive an error. So i extend the maximum character per line by override the utl_file.fopen method. After that it stopped the error, but the output characters are all non readable characters - 扡扡扡扡扡扡扡扡扡扡扡扡扡扡扡扡扡扡
Could someone suggest me a solution to insert my long string?
This is the code:
Procedure Write_to_file(filename in string, orderid in number, orderversion in number) is
f SYS.Utl_File.file_type;
tmporderid number(10);
tmporderversion number(10);
str string(1032);
begin
tmporderid := orderid;
tmporderversion := orderversion;
f := utl_file.fopen('EXPORTDIR2',filename,'W');
FOR s in
(Select SAP_STRING1
FROM BSACC_V_SAP_TABLE_2
where OrderId = tmporderid
AND OrderVersion = tmporderversion )
Loop
utl_file.put_line(f,s.sap_string1||chr(10));
end loop;
utl_file.fclose(f);
end;
OS and DB version:
Window XP professional English
Oracle 10g
Thank you
Bryan