Subject using Row_Count
Author Rick Roen
FB 1.5.4.4910

Either I am completely missing something or Row_Count does not work
like I expect.

I have an SP like this:

********************************
declare RowsInserted Integer = 0;
declare RowsInserted1 Integer = 0;

//this select returns 252 rows
For Select col1, col2,...
from Table1
into...
do begin

//do some other selects to set some variables
Insert into Table2
(col1, col2,...)
Values
(var1, var2,...);

RowsInserted = RowsInserted + Row_Count; //(returns 31878 wrong!)
RowsInserted1 = RowsInserted1 + 1; //(returns 252 correct!)

end

********************************

FYI: 252 added to itself 252 times (the number of iterations) = 63756.

Can someone tell me why I don't get 252 with Row_Count?

Regards,

Rick