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


------------------------------------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Visit http://www.firebirdsql.org and click the Resources item
on the main (top) menu.  Try Knowledgebase and FAQ links !

Also search the knowledgebases at http://www.ibphoenix.com 

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/firebird-support/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/firebird-support/join
    (Yahoo! ID required)

<*> To change settings via email:
    [email protected] 
    [email protected]

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/

Reply via email to