SQL*Plus Counting Updates

From: mouse <spamtrap_at_safe-mail.net>
Date: 17 Jun 2004 04:12:28 -0700
Message-ID: <56ef365c.0406170312.208aa975_at_posting.google.com>



Hi

[Quoted] 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';
update c_store_tb set class_lk_id = 13 where ccn = '010010';
update c_store_tb set class_lk_id = 14 where ccn = '010012';
update c_store_tb set class_lk_id = 14 where ccn = '010015';
update c_store_tb set class_lk_id = 14 where ccn = '010017';
update c_store_tb set class_lk_id = 119 where ccn = '010051';
update c_store_tb set class_lk_id = 119 where ccn = '010054';

[Quoted] 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 would like to see is: '2354 rows updated and 23 rows not updated'!

The steps that I have taken so far are to spool the results to a file and I can then import the file into Excel or whatever and count the messages - but this takes time!

I think the approach to take would be to declare a variable to count the updates (how?) which is incremented on each update. This is where I get stuck!

Can anyone help?

Many thanks

Phil Smyth
Productivity Systems Manager
the Co-operative Group Received on Thu Jun 17 2004 - 13:12:28 CEST

Original text of this message