<?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: arcpy notebook problem where clause for select analysis? in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/arcpy-notebook-problem-where-clause-for-select/m-p/1142050#M63689</link>
    <description>&lt;P&gt;you are right the () are useless, I put them in out of despair because without it doesn't work as well &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 09 Feb 2022 12:45:34 GMT</pubDate>
    <dc:creator>JohannesBierer</dc:creator>
    <dc:date>2022-02-09T12:45:34Z</dc:date>
    <item>
      <title>arcpy notebook problem where clause for select analysis?</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-notebook-problem-where-clause-for-select/m-p/1141998#M63683</link>
      <description>&lt;P&gt;I have problems in ArcGIS Pro 2.8 notebooks with a where clause of two long fields of a file geodatabase feature class (FID fields after union):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;where_clause_1 = '("FID_outBarriereBuffer" = -1 AND "FID_Nutzung_Weide" &amp;gt; -1)'
arcpy.analysis.Select(inBarriere, outWeide, where_clause_1)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With this I get the following message:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class=""&gt;ExecuteError&lt;/SPAN&gt;: ERROR 000358: Ungültiger Ausdruck ("FID_outBarriereBuffer" = -1 AND "FID_Nutzung_Weide" &amp;gt; -1)
Fehler beim Ausführen von (Select).&lt;/PRE&gt;&lt;P&gt;Any ideas for a solution?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Feb 2022 08:14:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-notebook-problem-where-clause-for-select/m-p/1141998#M63683</guid>
      <dc:creator>JohannesBierer</dc:creator>
      <dc:date>2022-02-09T08:14:30Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy notebook problem where clause for select analysis?</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-notebook-problem-where-clause-for-select/m-p/1142008#M63684</link>
      <description>&lt;P&gt;If I use select layer by attribute and copy feature there is no problem?&lt;/P&gt;&lt;LI-CODE lang="python"&gt;arcpy.management.MakeFeatureLayer(outUnion, outUnionLayer)

arcpy.management.SelectLayerByAttribute(outUnionLayer, 'NEW_SELECTION', 
                                        '"FID_Nutzung_Weide" &amp;gt; -1 And "FID_outBarriereBuffer" = -1')

arcpy.management.CopyFeatures(outUnionLayer, outWeide)&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 09 Feb 2022 09:16:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-notebook-problem-where-clause-for-select/m-p/1142008#M63684</guid>
      <dc:creator>JohannesBierer</dc:creator>
      <dc:date>2022-02-09T09:16:14Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy notebook problem where clause for select analysis?</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-notebook-problem-where-clause-for-select/m-p/1142043#M63685</link>
      <description>&lt;P&gt;I would do the query manually to and copy the snippet to make sure the right sql variant is used for the inputs&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/tool-reference/analysis/select.htm" target="_blank"&gt;Select (Analysis)—ArcGIS Pro | Documentation&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Feb 2022 12:11:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-notebook-problem-where-clause-for-select/m-p/1142043#M63685</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2022-02-09T12:11:52Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy notebook problem where clause for select analysis?</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-notebook-problem-where-clause-for-select/m-p/1142045#M63687</link>
      <description>&lt;P&gt;Maybe try it without the ( ).&lt;/P&gt;</description>
      <pubDate>Wed, 09 Feb 2022 12:27:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-notebook-problem-where-clause-for-select/m-p/1142045#M63687</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2022-02-09T12:27:39Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy notebook problem where clause for select analysis?</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-notebook-problem-where-clause-for-select/m-p/1142048#M63688</link>
      <description>&lt;P&gt;Thank you for your good idea. It leads then to something like this (if I build a model and export to python):&lt;/P&gt;&lt;LI-CODE lang="c"&gt;arcpy.analysis.Select(in_features=outUnion, out_feature_class=outUnion_Select, where_clause="FID_Nutzung_Weide &amp;gt; -1 And FID_outBarriereBuffer = -1")&lt;/LI-CODE&gt;&lt;P&gt;but doesn't work in the notebook.&lt;/P&gt;&lt;P&gt;Think I will use the select by attribute&amp;nbsp; + copy feature solution to get to an end ...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Feb 2022 12:44:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-notebook-problem-where-clause-for-select/m-p/1142048#M63688</guid>
      <dc:creator>JohannesBierer</dc:creator>
      <dc:date>2022-02-09T12:44:05Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy notebook problem where clause for select analysis?</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-notebook-problem-where-clause-for-select/m-p/1142050#M63689</link>
      <description>&lt;P&gt;you are right the () are useless, I put them in out of despair because without it doesn't work as well &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Feb 2022 12:45:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-notebook-problem-where-clause-for-select/m-p/1142050#M63689</guid>
      <dc:creator>JohannesBierer</dc:creator>
      <dc:date>2022-02-09T12:45:34Z</dc:date>
    </item>
  </channel>
</rss>

