Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: How to handle newlines in files via PL/SQL
"Koez" <jani.mannisto_at_nettaxi.com> wrote in message news:<eoCS8.146$8d7.5407_at_read2.inet.fi>...
> Hi, I need help with the followin procedure:
>
> Procedure TEST
> IS
> file_in UTL_FILE.FILE_TYPE;
> BEGIN
> file_in := UTL_FILE.FOPEN ('F:\SAPJ\Files', 'koez.txt', 'W');
> UTL_FILE.PUT (file_in, '1');
> UTL_FILE.PUT (file_in, '11');
> UTL_FILE.NEW_LINE (file_in);
> UTL_FILE.PUT (file_in, '2');
> UTL_FILE.FCLOSE(file_in);
> END;
>
> It outputs lines just nicely but I don't want see that last linefeed just
> after letter "2" - what can I do to prevent this
> (I think is has something to do with FCLOSE)??
>
> Output:
>
> row 1: 111
> row 2: 2
> row 3:
>
>
> !jani
I believe FCLOSE adds a standard EOL if one not already there. Received on Thu Jun 27 2002 - 21:25:00 CDT