Re: SQL*Plus Counting Updates

From: G Dahler <>
Date: Thu, 17 Jun 2004 11:07:18 -0400
Message-ID: <PsiAc.43654$>

[Quoted] [Quoted] "mouse" <> a écrit dans le message de
> 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';
> 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"


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

Original text of this message