<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Search and Update Cursor Need help. in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/search-and-update-cursor-need-help/m-p/340029#M26685</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;It really isn't difficult - so I take it you did not read any of the webhelp for the da search/update cursor syntax?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Go ahead and award post #2 the answer - the 'big green checkmark' - since he answered your original question and if you're still having difficulty, we'll go from there.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 09 Dec 2013 19:19:07 GMT</pubDate>
    <dc:creator>T__WayneWhitley</dc:creator>
    <dc:date>2013-12-09T19:19:07Z</dc:date>
    <item>
      <title>Search and Update Cursor Need help.</title>
      <link>https://community.esri.com/t5/python-questions/search-and-update-cursor-need-help/m-p/340022#M26678</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am trying to update a shapefile by using search and update cursor.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It searchs great on of the shapefile but when I try to update the other it only retrieves the first data.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I am providing my code so anyone could tell me how to modify it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;import arcpy&amp;nbsp; fc = "C:/Users/hchapa.LRGVDC911.000/Documents/ArcGIS/Default.gdb/Test_Shapefile_SpatialJoin" field = "parcel_1"&amp;nbsp;&amp;nbsp; fc2 = "C:/GIS_DATA/Test_Shapefile.shp"&amp;nbsp;&amp;nbsp; field2 = "parcel" value = [] cursor = arcpy.SearchCursor(fc) UpdateCursor = arcpy.UpdateCursor(fc2)&amp;nbsp;&amp;nbsp;&amp;nbsp; for row in cursor: &amp;nbsp;&amp;nbsp;&amp;nbsp; value = row.getValue(field) &amp;nbsp;&amp;nbsp;&amp;nbsp; for row2 in UpdateCursor: &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row2.setValue(field2, value) &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; UpdateCursor.updateRow(row2) &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print "Done"&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;the problem it only gets the first number but it doesnt iterate to the second number.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What am I doing wrong.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;P.S I already try many other solutions nothing works.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried using a list.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Dec 2013 14:21:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/search-and-update-cursor-need-help/m-p/340022#M26678</guid>
      <dc:creator>HectorChapa</dc:creator>
      <dc:date>2013-12-09T14:21:02Z</dc:date>
    </item>
    <item>
      <title>Re: Search and Update Cursor Need help.</title>
      <link>https://community.esri.com/t5/python-questions/search-and-update-cursor-need-help/m-p/340023#M26679</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I think you have your 'for' loops a little scrambled.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For each row in the search cursor, you're writing to every row in the update cursor. It probably accepts all the data once, which is why you're only getting the first data (over and over again I suspect).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;There are many good ways to traverse both lists at the same time, but a simple solution might be to just use a temporary list. Here's what I would try:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;import arcpy&amp;nbsp; fc = "C:/Users/hchapa.LRGVDC911.000/Documents/ArcGIS/Default.gdb/Test_Shapefile_SpatialJoin" field = "parcel_1"&amp;nbsp; fc2 = "C:/GIS_DATA/Test_Shapefile.shp" field2 = "parcel"&amp;nbsp; value = [] #You should remove this line. It's not needed.&amp;nbsp; cursor = arcpy.SearchCursor(fc) UpdateCursor = arcpy.UpdateCursor(fc2)&amp;nbsp; tempRows = []&amp;nbsp; for row in cursor: &amp;nbsp;&amp;nbsp;&amp;nbsp; value = row.getValue(field) &amp;nbsp;&amp;nbsp;&amp;nbsp; tempRows.append(value)&amp;nbsp; c = 0 #use as a counter&amp;nbsp; for row2 in UpdateCursor: &amp;nbsp;&amp;nbsp;&amp;nbsp; value = tempRows&lt;C&gt; #assumes both this are in the exact same order &amp;nbsp;&amp;nbsp;&amp;nbsp; row2.setValue(field2, value) &amp;nbsp;&amp;nbsp;&amp;nbsp; UpdateCursor.updateRow(row2) &amp;nbsp;&amp;nbsp;&amp;nbsp; c+=1 #count up by 1 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; del TempRows&amp;nbsp; print "Done"&lt;/C&gt;&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This solution assumes both list contain the same number of records in the same order. If this is not the case you will need a way or relating the records between the two table (a Join may work well in that case).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Good luck, let us know how it goes!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;~Josh&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Dec 2013 14:46:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/search-and-update-cursor-need-help/m-p/340023#M26679</guid>
      <dc:creator>JoshuaChisholm</dc:creator>
      <dc:date>2013-12-09T14:46:52Z</dc:date>
    </item>
    <item>
      <title>Re: Search and Update Cursor Need help.</title>
      <link>https://community.esri.com/t5/python-questions/search-and-update-cursor-need-help/m-p/340024#M26680</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Josh this works excellent. Thanks, for that list idea. I had the idea using the list but I could count up I was getting confused. but it work.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I am going to use spatial join to join them together but there is catch it creates an output. The target shapefile or feature class can not be rename or change in any particular way because there is another script creating an unique value into that feature class if we change that then we corrupt the algorithm. Basically in the end it gets replicated. Could the script you gave me work in an sde geodatabase.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;if so, how would i change my variables fc.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;would it have the string saying "Database connection/sde.default"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;like that.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Dec 2013 16:17:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/search-and-update-cursor-need-help/m-p/340024#M26680</guid>
      <dc:creator>HectorChapa</dc:creator>
      <dc:date>2013-12-09T16:17:05Z</dc:date>
    </item>
    <item>
      <title>Re: Search and Update Cursor Need help.</title>
      <link>https://community.esri.com/t5/python-questions/search-and-update-cursor-need-help/m-p/340025#M26681</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Just to add to what Josh did, you don't need the list, or furthermore you don't have to wait for the cursor to finish reading into memory the values from your search cursor in order to write to your update cursor.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You could 'dynamically' read/write via incrementing both cursors via the 'next' command as so:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
import arcpy

fc = "C:/Users/hchapa.LRGVDC911.000/Documents/ArcGIS/Default.gdb/Test_Shapefile_SpatialJoin"
field = "parcel_1"

fc2 = "C:/GIS_DATA/Test_Shapefile.shp"
field2 = "parcel"

value = [] #You should remove this line. It's not needed.

cursor = arcpy.SearchCursor(fc)
UpdateCursor = arcpy.UpdateCursor(fc2)

# fetch the 1st row, for both search/update cursors
row = cursor.next()
row2 = UpdateCursor.next()

while row:
&amp;nbsp;&amp;nbsp;&amp;nbsp; row2.setValue(field2, row.getValue(field))
&amp;nbsp;&amp;nbsp;&amp;nbsp; UpdateCursor.updateRow(row2)
&amp;nbsp;&amp;nbsp;&amp;nbsp; # advance both cursors to next row obj
&amp;nbsp;&amp;nbsp;&amp;nbsp; row = cursor.next()
&amp;nbsp;&amp;nbsp;&amp;nbsp; row2 = UpdateCursor.next()
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
del cursor, UpdateCursor

print "Done"
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;...even further optimized, use the da module ('data access' module) cursors, available with 10.1 and later - see this doc (and the 'next' command is available with da as well):&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Accessing data using cursors&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Desktop » Geoprocessing » Python » Accessing geographic data in Python&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.2/index.html#//002z0000001q000000" rel="nofollow noopener noreferrer" target="_blank"&gt;http://resources.arcgis.com/en/help/main/10.2/index.html#//002z0000001q000000&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 16:04:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/search-and-update-cursor-need-help/m-p/340025#M26681</guid>
      <dc:creator>T__WayneWhitley</dc:creator>
      <dc:date>2021-12-11T16:04:58Z</dc:date>
    </item>
    <item>
      <title>Re: Search and Update Cursor Need help.</title>
      <link>https://community.esri.com/t5/python-questions/search-and-update-cursor-need-help/m-p/340026#M26682</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;whats the difference using the arcpy.UpdateCursor and arcpy.da.UpdateCursor. One is alot faster than the other one. Whats the difference.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Dec 2013 17:52:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/search-and-update-cursor-need-help/m-p/340026#M26682</guid>
      <dc:creator>HectorChapa</dc:creator>
      <dc:date>2013-12-09T17:52:17Z</dc:date>
    </item>
    <item>
      <title>Re: Search and Update Cursor Need help.</title>
      <link>https://community.esri.com/t5/python-questions/search-and-update-cursor-need-help/m-p/340027#M26683</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Good question actually.&amp;nbsp; You really won't find the answer here (the webhelp link provided just below), although this tells you more about what the module can do for you:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What is the data access module? (arcpy.da)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Desktop » Geoprocessing » ArcPy&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.2/index.html#//018w00000008000000"&gt;http://resources.arcgis.com/en/help/main/10.2/index.html#//018w00000008000000&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;...or this developer summit presentation introducing the module, an interesting discussion I stumbled across:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://proceedings.esri.com/library/userconf/devsummit12/papers/introducing_the_arcpy_data_access_module.pdf"&gt;http://proceedings.esri.com/library/userconf/devsummit12/papers/introducing_the_arcpy_data_access_module.pdf&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;More to the point, Jason Scheirer (ESRI) partly addresses your question:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://forums.arcgis.com/threads/37439-OH-MY-GOODNESS-CURSORS-ARE-FAAAASSSSTTTT!!#10"&gt;http://forums.arcgis.com/threads/37439-OH-MY-GOODNESS-CURSORS-ARE-FAAAASSSSTTTT!!#10&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you're still interested, see this thread too:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://forums.arcgis.com/threads/93195-performance-of-SearchCursor-and-da.SearchCursor"&gt;http://forums.arcgis.com/threads/93195-performance-of-SearchCursor-and-da.SearchCursor&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;-Wayne&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Dec 2013 18:44:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/search-and-update-cursor-need-help/m-p/340027#M26683</guid>
      <dc:creator>T__WayneWhitley</dc:creator>
      <dc:date>2013-12-09T18:44:00Z</dc:date>
    </item>
    <item>
      <title>Re: Search and Update Cursor Need help.</title>
      <link>https://community.esri.com/t5/python-questions/search-and-update-cursor-need-help/m-p/340028#M26684</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hey Wayne how would you change the code above to work with the arcpy.da. I am trying just to change it but it complaints.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Dec 2013 19:14:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/search-and-update-cursor-need-help/m-p/340028#M26684</guid>
      <dc:creator>HectorChapa</dc:creator>
      <dc:date>2013-12-09T19:14:54Z</dc:date>
    </item>
    <item>
      <title>Re: Search and Update Cursor Need help.</title>
      <link>https://community.esri.com/t5/python-questions/search-and-update-cursor-need-help/m-p/340029#M26685</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;It really isn't difficult - so I take it you did not read any of the webhelp for the da search/update cursor syntax?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Go ahead and award post #2 the answer - the 'big green checkmark' - since he answered your original question and if you're still having difficulty, we'll go from there.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Dec 2013 19:19:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/search-and-update-cursor-need-help/m-p/340029#M26685</guid>
      <dc:creator>T__WayneWhitley</dc:creator>
      <dc:date>2013-12-09T19:19:07Z</dc:date>
    </item>
    <item>
      <title>Re: Search and Update Cursor Need help.</title>
      <link>https://community.esri.com/t5/python-questions/search-and-update-cursor-need-help/m-p/340030#M26686</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks wayne I figured it out.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Dec 2013 16:40:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/search-and-update-cursor-need-help/m-p/340030#M26686</guid>
      <dc:creator>HectorChapa</dc:creator>
      <dc:date>2013-12-10T16:40:06Z</dc:date>
    </item>
    <item>
      <title>Re: Search and Update Cursor Need help.</title>
      <link>https://community.esri.com/t5/python-questions/search-and-update-cursor-need-help/m-p/340031#M26687</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I think you have your 'for' loops a little scrambled.&lt;BR /&gt;&lt;BR /&gt;For each row in the search cursor, you're writing to every row in the update cursor. It probably accepts all the data once, which is why you're only getting the first data (over and over again I suspect).&lt;BR /&gt;&lt;BR /&gt;There are many good ways to traverse both lists at the same time, but a simple solution might be to just use a temporary list. Here's what I would try:&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import arcpy

fc = "C:/Users/hchapa.LRGVDC911.000/Documents/ArcGIS/Default.gdb/Test_Shapefile_SpatialJoin"
field = "parcel_1"

fc2 = "C:/GIS_DATA/Test_Shapefile.shp"
field2 = "parcel"

value = [] #You should remove this line. It's not needed.

cursor = arcpy.SearchCursor(fc)
UpdateCursor = arcpy.UpdateCursor(fc2)

tempRows = []

for row in cursor:
&amp;nbsp;&amp;nbsp;&amp;nbsp; value = row.getValue(field)
&amp;nbsp;&amp;nbsp;&amp;nbsp; tempRows.append(value)

c = 0 #use as a counter

for row2 in UpdateCursor:
&amp;nbsp;&amp;nbsp;&amp;nbsp; value = tempRows&lt;C&gt; #assumes both this are in the exact same order
&amp;nbsp;&amp;nbsp;&amp;nbsp; row2.setValue(field2, value)
&amp;nbsp;&amp;nbsp;&amp;nbsp; UpdateCursor.updateRow(row2)
&amp;nbsp;&amp;nbsp;&amp;nbsp; c+=1 #count up by 1
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
del TempRows

print "Done"&lt;/C&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;This solution assumes both list contain the same number of records in the same order. If this is not the case you will need a way or relating the records between the two table (a Join may work well in that case).&lt;BR /&gt;&lt;BR /&gt;Good luck, let us know how it goes!&lt;BR /&gt;~Josh&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Hey josh what about if I want to get the geometry to make sure they are overlaying each other.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 16:05:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/search-and-update-cursor-need-help/m-p/340031#M26687</guid>
      <dc:creator>HectorChapa</dc:creator>
      <dc:date>2021-12-11T16:05:01Z</dc:date>
    </item>
    <item>
      <title>Re: Search and Update Cursor Need help.</title>
      <link>https://community.esri.com/t5/python-questions/search-and-update-cursor-need-help/m-p/340032#M26688</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello again Hector,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I think you're best switching to Wayne's code and adding a ".contains" line.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Wayne's Code (modified):&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
import arcpy

fc = "C:/Users/hchapa.LRGVDC911.000/Documents/ArcGIS/Default.gdb/Test_Shapefile_SpatialJoin"
field = "parcel_1"

fc2 = "C:/GIS_DATA/Test_Shapefile.shp"
field2 = "parcel"

value = [] #You should remove this line. It's not needed.

cursor = arcpy.SearchCursor(fc)
UpdateCursor = arcpy.UpdateCursor(fc2)

# fetch the 1st row, for both search/update cursors
row = cursor.next()
row2 = UpdateCursor.next()

while row:
&amp;nbsp;&amp;nbsp;&amp;nbsp; if row.shape.touches(row2.shape): 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row2.setValue(field2, row.getValue(field))
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; UpdateCursor.updateRow(row2)
&amp;nbsp;&amp;nbsp;&amp;nbsp; # advance both cursors to next row obj
&amp;nbsp;&amp;nbsp;&amp;nbsp; row = cursor.next()
&amp;nbsp;&amp;nbsp;&amp;nbsp; row2 = UpdateCursor.next()
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
del cursor, UpdateCursor

print "Done"
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Although, a different process like Spatial Join may be a better approach for what you're doing.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 16:05:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/search-and-update-cursor-need-help/m-p/340032#M26688</guid>
      <dc:creator>JoshuaChisholm</dc:creator>
      <dc:date>2021-12-11T16:05:04Z</dc:date>
    </item>
  </channel>
</rss>

