Home » SQL & PL/SQL » SQL & PL/SQL » Loading unique text file names with utl_file (Oravle 8i, forms 6i)
Loading unique text file names with utl_file [message #568087] Tue, 09 October 2012 08:17 Go to next message
dev_777
Messages: 30
Registered: June 2010
Member
I am using an Oracle 8i database.

We intend creating a dbms_job that would run every 5 minutes. The job executes a script that would use utl_file to read two text files (a header file and detail file) from a particular directory and load the data into temporary tables. The naming convention of the files are Parts_Master_DD/MM/YY HH:MI:SS and Parts_Stats_DD/MM/YY HH:MI:SS. Both files to be stored in the same directory.

If the file name was constant ie. Parts_Master, Parts_Stats I would not have a problem. However with each file name now going to be unique, how do I handle this using utl_file.

To add to my dilemma, within an hour more than one set of files could be piped to the directory to be read into the database.
Re: Loading unique text file names with utl_file [message #568090 is a reply to message #568087] Tue, 09 October 2012 08:26 Go to previous messageGo to next message
BlackSwan
Messages: 23061
Registered: January 2009
Senior Member
> The job executes a script that would use utl_file to read two text files

scripts are OS dependent & you decided to NOT share your OS name & version with us.

Please read and follow the forum guidelines, to enable us to help you:

http://www.orafaq.com/forum/t/88153/0/
Re: Loading unique text file names with utl_file [message #568095 is a reply to message #568087] Tue, 09 October 2012 08:32 Go to previous messageGo to next message
Michel Cadot
Messages: 59814
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Do not use PL/SQL (and dbms_job) for this, use a shell script and OS scheduler.

Regards
Michel
Re: Loading unique text file names with utl_file [message #568162 is a reply to message #568095] Wed, 10 October 2012 00:07 Go to previous message
dev_777
Messages: 30
Registered: June 2010
Member
Thanks Michel, spoke to a Unix guru and that should work fine.
Previous Topic: Conditional insert with multiple subqueries
Next Topic: How to execute function in sql developer
Goto Forum:
  


Current Time: Fri Nov 28 00:15:07 CST 2014

Total time taken to generate the page: 0.68486 seconds