Shouldn't you be looking for the errors in weekly_deletes.log? "Duret, Kathy" <kduret@xxxxxxxxxxxxxxxxxxxx> wrote: And yes, I did google... ok, what I want to do is do a weekly export for some tables based upon a query for some tables. If the export is ok then I want to delete from the tables. If not, like there is a EXP error or warning I don't want to do the deletes So I want to check the return code from the export. However, when I have a warning from the export, I am still doing the delete..... This is what I have.... sqlplus -s /nolog << sql_block > $LOGFILE whenever oserror exit 1 whenever sqlerror exit 2 !exp $USERID tables=table1,table_rates file=weekly_deletes.dmp log=weekly_deletes.log query=\"where id in \(select id from table1 where close_date \< sysdate-32 \)\" exit sqlblock ret_code=$? oerr=`echo $LOGFILE | egrep -ic "ora-|exp-|pls-|sp2-"` Probably something stupid I am doing wrong..... can't seem to see it...need many margueritas.... Kathy This transmission contains information solely for intended recipient and may be privileged, confidential and/or otherwise protect from disclosure. If you are not the intended recipient, please contact the sender and delete all copies of this transmission. This message and/or the materials contained herein are not an offer to sell, or a solicitation of an offer to buy, any securities or other instruments. The information has been obtained or derived from sources believed by us to be reliable, but we do not represent that it is accurate or complete. Any opinions or estimates contained in this information constitute our judgment as of this date and are subject to change without notice. Any information you share with us will be used in the operation of our business, and we do not request and do not want any material, nonpublic information. Absent an express prior written agreement, we are not agreeing to treat any information confidentially and will use any and all information and reserve the right to publish or disclose any information you share with us. ---------------------------------------------------------------- Please see the official ORACLE-L FAQ: http://www.orafaq.com ---------------------------------------------------------------- To unsubscribe send email to: oracle-l-request@xxxxxxxxxxxxx put 'unsubscribe' in the subject line. -- Archives are at //www.freelists.org/archives/oracle-l/ FAQ is at //www.freelists.org/help/fom-serve/cache/1.html ----------------------------------------------------------------- --------------------------------- Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! ---------------------------------------------------------------- Please see the official ORACLE-L FAQ: http://www.orafaq.com ---------------------------------------------------------------- To unsubscribe send email to: oracle-l-request@xxxxxxxxxxxxx put 'unsubscribe' in the subject line. -- Archives are at //www.freelists.org/archives/oracle-l/ FAQ is at //www.freelists.org/help/fom-serve/cache/1.html -----------------------------------------------------------------