Re: dbaccess updated rows
Posted in 2009
Topics: Server Administration
Hi Ralf,
start the script from the unix shell and direct the output to a file.
dbaccess database script.sql 1>logdatei 2>&1
In logdatei you will see the amount of rows updated for each update
statement.
HTH,
Reinhard.
> -----Original Message-----
> From: informix-list-bounces@iiug.org
> [mailto:informix-list-bounces@iiug.org]On Behalf Of Ralf Hackmann
> Sent: Friday, June 19, 2009 2:28 PM
> To: informix-list@iiug.org
> Subject: dbaccess updated rows
>
>
> 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
>
A better way would be to use -e option of dbaccess
dbaccess -e database script.sql > script.out 2>&1and it would produce output in script.out as
update table where col1='aaa'
245 rows updated
In article <mailman.70.1245415369.4791.informix-list@iiug.org>, Habichtsberg,
Reinhard says...
>
>Hi Ralf,
>
>start the script from the unix shell and direct the output to a file.
>
>dbaccess database script.sql 1>logdatei 2>&1
>
>In logdatei you will see the amount of rows updated for each update
>statement.
>
>HTH,
>Reinhard.
>
>
>> -----Original Message-----
>> From: informix-list-bounces@iiug.org
>> [mailto:informix-list-bounces@iiug.org]On Behalf Of Ralf Hackmann
>> Sent: Friday, June 19, 2009 2:28 PM
>> To: informix-list@iiug.org
>> Subject: dbaccess updated rows
>>
>>
>> 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
>>