Re: time delay in *.sql file
Posted in 1997
even better;
you could run it from the command line and send the output to a file
dbaccess database_name < dbscript.sql > dbscript.out 2>&1
in ksh this will pipe both stout and sterr to dbscript.out
--
Scott Kolaya
kolaya@acmenet.net
Mark D. Stock <mdstock@informix.com> wrote in article
<3430AEA9.13EE4071@informix.com>...
> Anitha Prasad wrote:
> >
> > Hello,
> > I need to add time delay( something like sleep 100 on unix) besfore my
> > transaction closes the database.
> > To make myself clear. For example I have a file delete.sql:
> >
> > DATABASE customer;> > DELETE * from customer where c_num>2500;
> >
> > When I execute this at the command line using:
> > $INFORMIXDIR/bin/dbaccess - delete.sql
> >
> > The following occurs on the screen:
> > Database selected
> > 300 rows deleted
> > Database closed
> >
> > This happens too fast and hence I need to include something like:
> >
> > DATABASE customer;> > DELETE * from customer where c_num>2500;
> > some time delay
> > CLOSE DATABASE;
> >
> > How do I accomplish this.
>
> I presume you wish to see the count. Why not just run it from the
> command line like so:
>
> dbaccess database_name my_script
> ?
>
> Hope that helps,
> --
> Mark.
>
> +----------------------------------------------------------+-----------+
> |Mark D. Stock - Informix SA http://www.informix.com |//////// /|
> |mailto:mdstock@informix.com FAQ http://www.iiug.org |///// / //|
> | +-----------------------------------+//// / ///|
> | Tel: +27 11 807 0313 |If it's slow, the users complain. |/// / ////|
> | Fax: +27 11 807 2594 |If it's fast, the users keep quiet.|// / /////|
> |Cell: +27 83 250 2325 |Therefore, "No news: travels fast"!|/ ////////|
> +----------------------+-----------------------------------+-----------+
>