Re: SQL*Plus Counting Updates
Date: Thu, 17 Jun 2004 11:07:18 -0400
Message-ID: <PsiAc.43654$7H1.1470517_at_news20.bellglobal.com>
[Quoted] [Quoted] "mouse" <spamtrap_at_safe-mail.net> a écrit dans le message de
news:56ef365c.0406170312.208aa975_at_posting.google.com...
> Hi
>
> I have several .sql scripts which are in the form of:
>
> update c_store_tb set class_lk_id = 14 where ccn = '010005';
> update c_store_tb set class_lk_id = 14 where ccn = '010008';
<snip>
> Each script can be up to 5000 lines long. On running the script I am
> told:
> '1 row updated' or '0 rows updated' for each of the rows. The output I
[Quoted] If you are un UNIX and really update either 1 or 0 row, you could spool the file to a text file and use grep or awk to count the lines containing "0 rows updated" and "1 row updated"
eg:
updated=`grep "1 row updated" spool.lst | wc -l` and notupdated=`grep "1 row updated" spool.lst | wc -l`
Crude, not efficient, but better than excel. I would be better to write an awk program and count all the same time.
On Windoze, you could install cygwin and use a bash shell scipt to do it.
just my 0.02 Received on Thu Jun 17 2004 - 17:07:18 CEST