db.mytable.import_from_csv(..., unique='my_unique_column') will do an update instead of an insert if the value of the "my_unique_column" field matches that of an existing record in the database.
Anthony On Monday, January 11, 2016 at 12:07:55 PM UTC-5, goome wrote: > > hi > Does import_from_csv_file only operate insert sql statement or it could > also operate update record? In this case would it be enough the presence of > unique column in the csv(without id) for it? > Thanks > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.