I did it before, something like:
###################################################
rows = db(db.table).select()
for row in rows:
row.update_record(mycomputedfield=lambda r:function(r))
###################################################
where function(r) is the same function I used for the computed field.
Better to run this kind of thing using web2py Shell.
--
Bruno Rocha
http://about.me/rochacbruno/bio
2011/2/7 Johann Spies <[email protected]>
> If I have a table and add a computed field - how do I update existing
> records? I am speaking of tables with many thousands of records.
>
> Regards
> Johann
>
> --
> May grace and peace be yours in abundance through the full knowledge of
> God and of Jesus our Lord! His divine power has given us everything we need
> for life and godliness through the full knowledge of the one who called us
> by his own glory and excellence.
> 2 Pet. 1:2b,3a
>
>