SQL - write file
Database
1
Posts
1
Posters
0
Views
1
Watching
-
Hi all, I'm currently trying to write a few lines into a csv file from a sql package. One thing I have to make sure is that the csv file doesn't end with a blank line. That is, I have to delete all new line and return feed from the end of the file. I've tried: fileOut := utl_file.fopen('xxx', 'yyy', 'W', 32760); utl_file.put_line(fileout, 'line 1' || Chr(13)); utl_file.put(fileout, 'line 2'); utl_file.fclose(fileOut); But when I open the csv file created, there's always a blank line at the end of the file. It seems like a blank line is always being appended to the end of the file automatically on file close. Is this true? And are there any ways of avoiding this through sql? Thanks