Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Characters limit in utl_file.put_line()

694157Jul 13 2009 — edited Jul 14 2009
Hi 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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 11 2009
Added on Jul 13 2009
5 comments
8,327 views