<?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: gp.select_analysis(row,output) iternation,  possible or not? in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/gp-select-analysis-row-output-iternation-nbsp/m-p/181655#M6083</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;For ESRI-comliant SQL:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//00s500000033000000.htm"&gt;http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//00s500000033000000.htm&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 24 Nov 2010 20:55:22 GMT</pubDate>
    <dc:creator>ChrisSnyder</dc:creator>
    <dc:date>2010-11-24T20:55:22Z</dc:date>
    <item>
      <title>gp.select_analysis(row,output) iternation,  possible or not?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/gp-select-analysis-row-output-iternation-nbsp/m-p/181651#M6079</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;how to iterate a function as:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;rows=gp.SearchCursor(featureclass)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;row=rows.Next()&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;while row:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; gp.select_analysis(&lt;/SPAN&gt;&lt;STRONG&gt;row&lt;/STRONG&gt;&lt;SPAN&gt;,output)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; row=rows.Next()&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;so that I would be able to select a feature record from row1 to row n in a featurecalss &lt;/SPAN&gt;&lt;STRONG&gt;seperately&lt;/STRONG&gt;&lt;SPAN&gt;. But clearly, "select_analysis" doesn't accept "row" as a leagal input... SO any alternatives?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I was thinking of SQL in {where clause}, but how to write the SQL codes (it seems SQL dosen't allow an iterating variable either, like {where i=range(1,100), "OBJECTID=i"} ?)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks indeed!!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Nov 2010 19:31:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/gp-select-analysis-row-output-iternation-nbsp/m-p/181651#M6079</guid>
      <dc:creator>JianLiu2</dc:creator>
      <dc:date>2010-11-24T19:31:25Z</dc:date>
    </item>
    <item>
      <title>Re: gp.select_analysis(row,output) iternation,  possible or not?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/gp-select-analysis-row-output-iternation-nbsp/m-p/181652#M6080</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Yes, all you need to use the OBJECTID value (BTW, not always called OBJECTID). For example:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;myFC = r"C:\temp\test.shp"
oidFieldName = gp.describe(myFC).oidfieldname
searchRows = gp.searchcursor(myFC)
searchRow = searchRows.next()
while searchRow:
&amp;nbsp;&amp;nbsp; oidFieldValue = searchRow.getvalue(oidFieldName)
&amp;nbsp;&amp;nbsp; outputFC = r"C:\temp\output_" + str(oidFieldValue) + ".shp"
&amp;nbsp;&amp;nbsp; gp.Select(myFC, outputFC, oidFieldName + " = " + str(oidFieldValue)
&amp;nbsp;&amp;nbsp; searchRow = searchRows.next()&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 09:16:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/gp-select-analysis-row-output-iternation-nbsp/m-p/181652#M6080</guid>
      <dc:creator>ChrisSnyder</dc:creator>
      <dc:date>2021-12-11T09:16:49Z</dc:date>
    </item>
    <item>
      <title>Re: gp.select_analysis(row,output) iternation,  possible or not?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/gp-select-analysis-row-output-iternation-nbsp/m-p/181653#M6081</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;thanks! try it right away!!:D&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Nov 2010 20:03:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/gp-select-analysis-row-output-iternation-nbsp/m-p/181653#M6081</guid>
      <dc:creator>JianLiu2</dc:creator>
      <dc:date>2010-11-24T20:03:42Z</dc:date>
    </item>
    <item>
      <title>Re: gp.select_analysis(row,output) iternation,  possible or not?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/gp-select-analysis-row-output-iternation-nbsp/m-p/181654#M6082</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;it perfectly works, thanks!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I think my problem is the SQL sentence .., such as {OIDFieldName + "= " + str(OIDFieldValue)}.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I didn't know the expression: + " = " + ...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any suggestions on manuals/references for SQL writing? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;best&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Jian&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Nov 2010 20:53:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/gp-select-analysis-row-output-iternation-nbsp/m-p/181654#M6082</guid>
      <dc:creator>JianLiu2</dc:creator>
      <dc:date>2010-11-24T20:53:12Z</dc:date>
    </item>
    <item>
      <title>Re: gp.select_analysis(row,output) iternation,  possible or not?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/gp-select-analysis-row-output-iternation-nbsp/m-p/181655#M6083</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;For ESRI-comliant SQL:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//00s500000033000000.htm"&gt;http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//00s500000033000000.htm&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Nov 2010 20:55:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/gp-select-analysis-row-output-iternation-nbsp/m-p/181655#M6083</guid>
      <dc:creator>ChrisSnyder</dc:creator>
      <dc:date>2010-11-24T20:55:22Z</dc:date>
    </item>
  </channel>
</rss>

