<?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 Invalid expression Failed to execute (Select) in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/invalid-expression-failed-to-execute-select/m-p/1594506#M27540</link>
    <description>&lt;P&gt;Hi everyone.&lt;BR /&gt;&lt;BR /&gt;I am pretty sure this should be bug but intend to see if someone got the answer to this strange behavior.&lt;BR /&gt;&lt;BR /&gt;So, we have Samples geodatabase that contains the feature class, and we use two set of expression with&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;arcpy&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;.analysis.Select to generate two feature classes from the dataset.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bharat_2-1741727124260.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/127699iFE5D86319399C325/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Bharat_2-1741727124260.png" alt="Bharat_2-1741727124260.png" /&gt;&lt;/span&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;The expressions when used within ArcGIS Pro (Notebook, geoprocessing tool, definition query) works as intended.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bharat_0-1741726954642.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/127697iD9B83F4A575D7010/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Bharat_0-1741726954642.png" alt="Bharat_0-1741726954642.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;But the same thing started failing since last week as seen from the log file&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bharat_1-1741727031453.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/127698iBDAA5CD7CB624A96/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Bharat_1-1741727031453.png" alt="Bharat_1-1741727031453.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Now this the very first function of the script and it has been failing, strangely enough if I am run the whole script from Notebook there are no error&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bharat_3-1741727340095.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/127700iA660F6F8DF8A0D3B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Bharat_3-1741727340095.png" alt="Bharat_3-1741727340095.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;But it fails, I might try to use other arcpy function which are better suited to create temporary file but need to confirm if the mistake is from my side or its general geoprocessing mess.&lt;BR /&gt;&lt;BR /&gt;TIA&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 11 Mar 2025 21:11:07 GMT</pubDate>
    <dc:creator>Bharat</dc:creator>
    <dc:date>2025-03-11T21:11:07Z</dc:date>
    <item>
      <title>Invalid expression Failed to execute (Select)</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/invalid-expression-failed-to-execute-select/m-p/1594506#M27540</link>
      <description>&lt;P&gt;Hi everyone.&lt;BR /&gt;&lt;BR /&gt;I am pretty sure this should be bug but intend to see if someone got the answer to this strange behavior.&lt;BR /&gt;&lt;BR /&gt;So, we have Samples geodatabase that contains the feature class, and we use two set of expression with&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;arcpy&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;.analysis.Select to generate two feature classes from the dataset.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bharat_2-1741727124260.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/127699iFE5D86319399C325/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Bharat_2-1741727124260.png" alt="Bharat_2-1741727124260.png" /&gt;&lt;/span&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;The expressions when used within ArcGIS Pro (Notebook, geoprocessing tool, definition query) works as intended.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bharat_0-1741726954642.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/127697iD9B83F4A575D7010/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Bharat_0-1741726954642.png" alt="Bharat_0-1741726954642.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;But the same thing started failing since last week as seen from the log file&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bharat_1-1741727031453.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/127698iBDAA5CD7CB624A96/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Bharat_1-1741727031453.png" alt="Bharat_1-1741727031453.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Now this the very first function of the script and it has been failing, strangely enough if I am run the whole script from Notebook there are no error&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bharat_3-1741727340095.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/127700iA660F6F8DF8A0D3B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Bharat_3-1741727340095.png" alt="Bharat_3-1741727340095.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;But it fails, I might try to use other arcpy function which are better suited to create temporary file but need to confirm if the mistake is from my side or its general geoprocessing mess.&lt;BR /&gt;&lt;BR /&gt;TIA&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Mar 2025 21:11:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/invalid-expression-failed-to-execute-select/m-p/1594506#M27540</guid>
      <dc:creator>Bharat</dc:creator>
      <dc:date>2025-03-11T21:11:07Z</dc:date>
    </item>
    <item>
      <title>Re: Invalid expression Failed to execute (Select)</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/invalid-expression-failed-to-execute-select/m-p/1594643#M27541</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/837716"&gt;@Bharat&lt;/a&gt;&amp;nbsp;, if your script was working but has recently started failing instead, is it possible your data has changed (eg now Project = 'NUN' etc) so other parts of the script are now running that were not before ?&lt;/P&gt;</description>
      <pubDate>Wed, 12 Mar 2025 08:53:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/invalid-expression-failed-to-execute-select/m-p/1594643#M27541</guid>
      <dc:creator>ChrisUnderwood</dc:creator>
      <dc:date>2025-03-12T08:53:10Z</dc:date>
    </item>
    <item>
      <title>Re: Invalid expression Failed to execute (Select)</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/invalid-expression-failed-to-execute-select/m-p/1594848#M27542</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/159762"&gt;@ChrisUnderwood&lt;/a&gt;. Thanks for looking at this thread.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I checked the geodatabase and there seems to be no change in there. The script basically creates temporary feature class, adds new field, populate the new field and then finally delete the feature class in sde and append the data from the temporary feature class to the sde.&amp;nbsp;&lt;BR /&gt;&amp;nbsp;The other function doesnt even get to run as the failed select function finishes the script.&lt;BR /&gt;&lt;BR /&gt;I mean the sql expression works on definition query, notebook and the sql is valid. We use sql server as our sde so uppercase/lowercase doesnt matter. Have been using python f string so that python doesnt mess up single quote/ double quotes.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Mar 2025 17:45:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/invalid-expression-failed-to-execute-select/m-p/1594848#M27542</guid>
      <dc:creator>Bharat</dc:creator>
      <dc:date>2025-03-12T17:45:07Z</dc:date>
    </item>
  </channel>
</rss>

