Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: utl_file
On Feb 27, 4:16 pm, rankes..._at_yahoo.com wrote:
> I am trying to write a text file using utl_file to write to a file.
>
> I used
> UTL_FILE.FOPEN(v_ftp_folder, v_cms_file, 'w');
> UTL_FILE.PUT(v_outfile_handle, 'X');
> UTL_FILE.FCLOSE(v_outfile_handle);
>
> It is creating the file ok with required contents, but at the end it
> is adding a character chr(10) or '0A'. I do not want to add that
> character. Can somebody please help me how to not add that character.
>
> Thanks in advance,
> Murthy
You should always specify your oracle version when asking a question.
utl_file.fclose does add a newline as an act of flushing the buffer output.
In 10g, you have an option of creating binary file (add "b" to the
open mode
option) and use utl_file.put_raw instead of utl_file.put
If you are on 9i ... I don't think you have any other option other than process it on the OS side.
Anurag Received on Tue Feb 27 2007 - 19:43:17 CST