Update both a table and feature class

03-31-2017 01:29 PM
New Contributor

I am using a search cursor to get values from a rows field in a feature class, need to use the field value to multiply values and update fields in another table then calculate the Summary Statistics for the 2nd table and input that total into the first table. Is it possible to do an update cursor within an update cursor? 

0 Kudos
1 Reply
Frequent Contributor

While it is possible to run a cursor within a cursor, I would never recommend it.  There are far easier and faster ways to read and store data to be accessed later from one cursor and use it for operations for other cursors.  I'd highly recommend looking at Richard Fairhurst's blog post /blogs/richard_fairhurst/2014/11/08/turbo-charging-data-manipulation-with-python-cursors-and-diction...‌ for example of reading data to dictionaries to update values in different tables.

0 Kudos