Home » SQL & PL/SQL » SQL & PL/SQL » Truncating the content of a file
icon5.gif  Truncating the content of a file [message #159173] Thu, 16 February 2006 08:47 Go to next message
Messages: 65
Registered: October 2005
I'm writing a report that will be automatically executed at fixed intervals. The report will be called by a cron job under using, using the applmgr username.

In the course of the report, I am writing 5 files down to the file system in /tmp

The issue I have is that, in testing, I end up with the files not getting truncated when I rewrite to them. The applmgr user does not have the needed access to do anything but read the files. I need to be able to empty the files before my procedures start. I'm just not sure how ...
Re: Truncating the content of a file [message #189595 is a reply to message #159173] Fri, 25 August 2006 03:30 Go to previous messageGo to next message
Messages: 201
Registered: August 2006
Location: Denmark
Senior Member

I suspect You call a shell script from Your crontab.
Why not just delete the file from that script?

Re: Truncating the content of a file [message #189604 is a reply to message #159173] Fri, 25 August 2006 04:03 Go to previous message
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
If you use UTL_FILE, just make sure you open the file in mode W - this will truncate any existing file of that name.
Previous Topic: Table pratitioning
Next Topic: Invalid Batch Value Exception...
Goto Forum:

Current Time: Mon Jul 24 10:10:15 CDT 2017

Total time taken to generate the page: 0.04553 seconds