Subject RE: [firebird-support] Re: Update only First 10 problem ?
Author Alan McDonald
> When I say that work in stored procedure, I want say :
>
> DECLARE VARIABLE iCount INTEGER;
> BEGIN
> iCount = 0;
> FOR
> SELECT ID_TEST
> FROM TB_TEST
> INTO
> :RE_ID_TEST
> DO
> BEGIN
> UPDATE TB_TEST SET COL = '123'
> WHERE ID_TEST = :RE_ID_TEST;
> iCount = iCount + 1;
> IF (iCount < 10) THEN
> SUSPEND;
> ELSE
> EXIT;
> END
>
> Thank you for your answer, if you have a solution ...
> I tried with the other tables and it is the same result, all records
> are updated. :(

your FOR loop can use the FIRST syntax withou it being an issue
Alan