On Wed, Jul 14, 2010 at 12:07 PM, Alex Octan <alex@xxxxxxxxxxx> wrote: > I am facing a problem that seems to be simple. > The needed is to write a row in a text file (csv), and depends on the > business requirement, I have to concatenate two lines or more and write in a > file. This line usually can have more than 32K. > What I have done is to use utl_file, but as I have lines with more than > 32K, I get an error from Oracle that says the limit has reached. > > Is there any way to workaround, even using another package or feature?? > > The problem is that utl_file.put* do not write to a file They write to a buffer. The max buffer size is 32767 Attempts to flush the buffer to disk fail if buffer was filled and not terminated with a line terminator. At least, that's what I found after playing with it a few minutes. If you need to do this from within the database, you may want to considering using Java. Jared Still Certifiable Oracle DBA and Part Time Perl Evangelist Oracle Blog: http://jkstill.blogspot.com Home Page: http://jaredstill.com