Subject Is it safe to UPDATE a SELECT result?
Author Matthias Hanft
Hello,

I need to change some data in every record of a customer database.
Not very fancy (SELECT until EOF, UPDATE... just as usual). But it
just came to my mind that this way I'm updating the result of a
SELECT query - is this allowed (and safe)?

What I plan to do is about this:

StartTransaction;
SELECT ID, some_other_fields FROM CUSTOMERS ORDER BY ID;
while not Select_Eof do begin
UPDATE CUSTOMERS SET some_other_fields=some_new_data
WHERE ID=current_id;
end;
Select_Close;
CommitTransaction;

I don't want to "disturb" the SELECT command by my updates. From
what I know about Firebird, I'm pretty sure that it *should* work
this way; I'm just asking to be on the *very* safe side ;)

Thank you,

-Matt