Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Unix script help

Re: Unix script help

From: M Rafiq <rafiq9857_at_hotmail.com>
Date: Tue, 02 Mar 2004 16:35:42 -0500
Message-ID: <BAY99-F27s9Crgb16Rh0000a557@hotmail.com>


Mladen

"So that's how it is? We do the toiling and the credit goes to Jared?"

We all are gathered here because of this list, right. That's why credit goes to him. But don't worry no beer to anyone except cold drinks to every one who wants it.

One credit goes to you as well as you are the heart of this list, you know, who keeps this list alive with your good sense of humour and active participation.
Regards
Rafiq

From: Mladen Gogala <mladen_at_wangtrading.com> Reply-To: oracle-l_at_freelists.org
To: oracle-l_at_freelists.org
Subject: Re: Unix script help
Date: Tue, 2 Mar 2004 15:49:29 -0500

So that's how it is? We do the toiling and the credit goes to Jared? He'll probably even get a beer instead of us. Life just isn't fair!

On 03/02/2004 03:35:36 PM, M Rafiq wrote:
> Jacques,Tanel,Guang Mei,Raj and Mladen, the great
>
> Thanks for all your suggestion and scripts.
>
> What a great list, credit goes to Jared.
>
> Regards
> Rafiq
>
>
>
>
> From: "Jacques Kilchoer" <Jacques.Kilchoer_at_quest.com>
> Reply-To: oracle-l_at_freelists.org
> To: <oracle-l_at_freelists.org>
> CC: "M Rafiq" <rafiq9857_at_hotmail.com>
> Subject: RE: Unix script help
> Date: Tue, 2 Mar 2004 12:20:01 -0800
>
> How about putting a PL/SQL block between the create and the truncate?
> something like this
>
> whenever sqlerror then exit sql.sqlcode
>
> create table tangram.sw_save nologging
> tablespace tangram
> as select * from tangram.sw_use_t_h where sut_closed_dt =
> (sysdate-10);
>
> declare
> n pls_integer ;
> begin
> select count (*) into n
> from tangram.sw_save where rownum < 2 ;
> if n = 0
> then
> raise_application_error (-20010, 'no rows copied') ;
> end if ;
> end ;
> /
>
> truncate table tangram.sw_use_t_h;
>
> insert into tangram.sw_use_t_h
> select * from tangram.sw_save;
>
> commit;
>
> drop table tangram.sw_save;
>
> > -----Original Message-----
> > M Rafiq
> >
> > I need help for following sql script. I want to put condition before
> > truncate that table creation must be successful before
> > truncate runs. The
> > condition may be to check count before and after creation or
> > tracking of any
> > ORA/warning message but I could not make up my mind. I want
> > to put it in
> > cron to run it weekly.
> >
> > Is any body can help to give me some tips/script itself?
> >
> > create table tangram.sw_save nologging
> > tablespace tangram
> > as select * from tangram.sw_use_t_h where sut_closed_dt > =
> > (sysdate-10);
> >
> > truncate table tangram.sw_use_t_h;
> >
> > insert into tangram.sw_use_t_h
> > select * from tangram.sw_save;
> >
> > commit;
> >
> > drop table tangram.sw_save;
>
> _________________________________________________________________
> Fast. Reliable. Get MSN 9 Dial-up - 3 months for the price of 1!
> (Limited-time Offer)

http://click.atdmt.com/AVE/go/onm00200361ave/direct/01/
>
> ----------------------------------------------------------------
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> ----------------------------------------------------------------
> To unsubscribe send email to: oracle-l-request_at_freelists.org
> put 'unsubscribe' in the subject line.
> --
> Archives are at http://www.freelists.org/archives/oracle-l/
> FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
> -----------------------------------------------------------------
>



Please see the official ORACLE-L FAQ: http://www.orafaq.com

To unsubscribe send email to: oracle-l-request_at_freelists.org put 'unsubscribe' in the subject line.
--
Archives are at http://www.freelists.org/archives/oracle-l/
FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------

_________________________________________________________________
Get a FREE online computer virus scan from McAfee when you click here. 
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963

----------------------------------------------------------------
Please see the official ORACLE-L FAQ: http://www.orafaq.com
----------------------------------------------------------------
To unsubscribe send email to:  oracle-l-request_at_freelists.org
put 'unsubscribe' in the subject line.
--
Archives are at http://www.freelists.org/archives/oracle-l/
FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------
Received on Tue Mar 02 2004 - 15:33:15 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US