Simplest .... if you know the format of the files ... use external
tables.
Raj
--------------------------------------------------------------------------------
Rajendra dot Jamadagni at nospamespn dot com
All Views expressed in this email are strictly personal.
QOTD: Any clod can have facts, having an opinion is an art !
Rajendra dot Jamadagni at nospamespn dot com
All Views expressed in this email are strictly personal.
QOTD: Any clod can have facts, having an opinion is an art !
-----Original Message-----
From: Bellow, Bambi [mailto:[EMAIL PROTECTED]
Sent: Friday, November 14, 2003 11:59 AM
To: Multiple recipients of list ORACLE-L
Subject: RE: Reading files on the serverThere are really two answers to this and it depends largely on what you want to do. If you want to check for the existence of a file and generate an error if it's not there, you can do something along the lines of...whenever oserror <do something>!ls -l $DIR/$FILENAMEAlternatively, if you want to do something that requires an action based on something inside the log file, you have to run the SQLPLUS command as a separate shell. Here's an example:sqlplus << EOFuserofchoice/incrediblysecretpassworddef somevar=`grep -i yourvar $DIR/$FILENAME|awk '{print $NForsomething}'`def somevar2=$SOMETHINGFROMEARLIERINTHISPGMselect &somevar*&somevar2 from dual;exitEOFHTH,Bambi.-----Original Message-----
From: Gunnar Berglund [mailto:[EMAIL PROTECTED]
Sent: Thursday, November 13, 2003 10:14 PM
To: Multiple recipients of list ORACLE-L
Subject: Reading files on the serverHi all,I have a problem I hope you could help with.I have a job running on db server side as a cron and it creates information (log files). What methods I have if I want to read those log files with some pl/sql procedure etc (I mean from inside the db), are there any others than utl_file (which I suppose reads always at the same directory...)I am using 9iRel2 on Sun Solaris...Thanks in advanceGunnar
Want to chat instantly with your online friends? Get the FREE Yahoo! Messenger
**************************************************************************************
This e-mail message is confidential, intended only for the named recipient(s) above and may contain information that is privileged, attorney work product or exempt from disclosure under applicable law. If you have received this message in error, or are not the named recipient(s), please immediately notify corporate MIS at (860) 766-2000 and delete this e-mail message from your computer, Thank you.
**************************************************************************************4