trailing new lines when writing to file
428477Jul 16 2007 — edited Jul 16 2007Hello everybody,
is there a way to prevent oracle from putting a new line character at the end of a file?
I am trying to write data to a file and everything works fine..except..Somehow oracle always puts a new line character at the end of the last line. Example:
declare
DownloadFile utl_file.file_type;
BEGIN
DownloadFile := utl_file.fopen('MY_DIRECTORY', 'test'||to_char(sysdate,'yyyy-mm-dd hh24:mi:ss')||'.txt','W',32760);
utl_file.put(DownloadFile, 'aaaa' );
utl_file.fclose(DownloadFile);
END;
The result will be a one line with a line break at the end.
Is there a way to prevent the trailing line break? It's quite important as we want to use the resulting file as an input file for another application which can not cope with this trailing newline.
Best regards,
Moschen