Oracle PL/SQL UTL_FILE.PUT buffering

后端 未结 4 1908
没有蜡笔的小新
没有蜡笔的小新 2021-01-02 22:28

I\'m writing a large file > 7MB from an Oracle stored procedure and the requirements are to have no line termination characters (no carriage return/line feed) at the end of

4条回答
  •  天涯浪人
    2021-01-02 22:54

    Dustin,

    The Oracle documentation here: http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/u_file.htm#i1003404

    States that: FFLUSH physically writes pending data to the file identified by the file handle. Normally, data being written to a file is buffered. The FFLUSH procedure forces the buffered data to be written to the file. The data must be terminated with a newline character.

    The last sentence being the most pertinent.

    Could you not write the data using UTL_FILE.PUT_LINE before then searching the resulting file for the line terminators and removing them?

    Just a thought....

提交回复
热议问题