Subject Re: [ib-support] How many rows were affected?
Author Ann W. Harrison
At 06:08 PM 5/7/2001 +0200, Nando Dessena wrote:


>if I issue an update or delete statement inside a stored procedure, and
>want to know how many rows the statement has affected *from within the
>SP code*, is there a way?
>I know the information is accessible via the API, I just need it in the
>SP.

Given the way the engine works, updating or deleting in a for select
loop is very nearly as fast as a mass update or delete. Since the
procedure succeeds or fails as a unit, you get the same statement
level error unwind. So, just do a for select and keep a count.



Regards,

Ann
www.ibphoenix.com
We have answers.