I'm new to python so forgive me if this seems like a dumb question... I work for the city and we get parcel information monthly from the county. Usually the data comes in a text file which I then put in an mdb. I'm trying to write some code to run an update our layers with the updated monthly information. Currently, I've just been trying to get a few fields to update inside a 'test' file geodatabase but I'm stuck. I get the following error message with the following code. Any ideas?
Solved! Go to Solution.
You could use a dictionary with a list of values, in stead of a dictionary with a single field as value. This would require some changes in building the dictionary and the way the values are retrieved in the update cursor, but it can be done. If the code you tested was fast, it means that you don't have that many features to process. In that case it would not be a problem to create this larger dictionary (with lists as values).
Not sure about the rest, but you don't have the same number of single and double quotes.
Oops I forgot I corrected that one... When that is taken out I get the following error...
Runtime error
Traceback (most recent call last):
File "<string>", line 9, in <module>
RuntimeError: An invalid SQL statement was used. [Parcel_092015COPY]
Try building your SQL expression in a previous line, then printing it to confirm that it is what you think it is.
Have you tried doing this in model builder. Most everything you'll need should be in there and it will give you a head start if you need to do any coding.
I thought about model builder but this will run for more than 10,000 features so I was worried about it being too slow. Although, I'm not too familiar with MB so I may be wrong.
are your fields really situs and current_ow or those supposed to be sites and current_row which I did a brain translation to until I looked again
yea, 'situs' and 'current_ow' are actual field names.
just checking sometimes it is the little things...
10,000 features wouldn't be a problem. You could simply join the 2 tables then use field calculator.