Re: dbaccess updated rows
Posted in 2009
Try this...
$ cat dummy.sql
create temp table dummy_table ( code int , descr char(20));
insert into dummy_table values (1,'row1');
insert into dummy_table values (2,'row2');
insert into dummy_table values (3,'row3');
update dummy_table set descr='updated'||code where code=1;
update dummy_table set descr='updated'||code where code=2;
update dummy_table set descr='updated'||code where code=3;
$ dbaccess sysmaster dummy.sql 2>&1 | awk 'BEGIN {count=0} /row.*updated/ {count=count+$1} END { print count,"rows updated"} '3 rows updated
--- Em sex, 19/6/09, Ralf Hackmann <ralf.hackmann@gmail.com> escreveu:
De: Ralf Hackmann <ralf.hackmann@gmail.com>
Assunto: dbaccess updated rows
Para: informix-list@iiug.org
Data: Sexta-feira, 19 de Junho de 2009, 9:27
Hallo,
if I run in dbacces an update statement with an condition, dbaccess
shows me how many rows are updated.
But now I have an demand to run an sql script with about 8000 update
statements
....
UPDATE fyar1sta Set Kunde=3 Where Sa=0 and Artikel ='00045858-0200 ';
UPDATE fyar1sta Set Kunde=5 Where Sa=0 and Artikel ='00045865-0200 ';
UPDATE fyar1sta Set Kunde=45 Where Sa=0 and Artikel ='00045872-0200 ';
...
The scrip rund without an error and if I look in differtent records I
can see, that the field Kunde is updated.
But dbacces didt shown me at the end of the script, how many rows are
updatet.
It only shows me :
1 row(s) updated
So I can not verify if all rows of the script are updated.
Greetings
Ralf
_______________________________________________
Informix-list mailing list
Informix-list@iiug.org
http://www.iiug.org/mailman/listinfo/informix-list
Veja quais são os assuntos do momento no Yahoo! +Buscados
http://br.maisbuscados.yahoo.com