Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

9
  • 3
    Triple-nesting cursors is extraordinarily bad practice, and completely unnecessary based on your code sample. Best practice would be to build a dictionary of { unique_id : col1 } pairs in one pass of the SearchCursor, then updateRow using a lookup from unique_id in an UpdateCursor pass. Commented Jul 21, 2021 at 20:33
  • Thank you for that advise, I'm new in scripting. I'll implement your advise. Commented Jul 22, 2021 at 13:09
  • The error indicates type incompatibility between the two tables. Commented Jul 22, 2021 at 13:57
  • Oh wow, I was thinking in that regards yesterday. So, I should check if both tables have same data types? Is that what it is? Commented Jul 22, 2021 at 14:52
  • If unique_id is varchar, a numeric comparison will fail in Python just like SQL (though casting is available in both). To complete this question, edit it to include the table definition (column names and types) for both fc1 and fc2. Commented Jul 22, 2021 at 15:31