<?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: What is wrong with my where statement syntax in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/what-is-wrong-with-my-where-statement-syntax/m-p/303567#M23614</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Look at your line 20.&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;arcpy.Select_analysis("Locations_lyr"),\&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Maybe you wanted to comment that out?&amp;nbsp; The syntax in that line is incorrect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BTW - to post python code, you can use the syntax highlighter and select python.&amp;nbsp; when commenting, this is found in the ...More pulldown.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 05 Oct 2016 15:54:41 GMT</pubDate>
    <dc:creator>RebeccaStrauch__GISP</dc:creator>
    <dc:date>2016-10-05T15:54:41Z</dc:date>
    <item>
      <title>What is wrong with my where statement syntax</title>
      <link>https://community.esri.com/t5/python-questions/what-is-wrong-with-my-where-statement-syntax/m-p/303566#M23613</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I keep getting an error at line 22 of my code. It is telling me there is something wrong with my syntax. I have tried it a few different ways but have not been able to figure it out. Can anyone help?&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/239872_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Oct 2016 15:31:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/what-is-wrong-with-my-where-statement-syntax/m-p/303566#M23613</guid>
      <dc:creator>TravisPreston2</dc:creator>
      <dc:date>2016-10-05T15:31:11Z</dc:date>
    </item>
    <item>
      <title>Re: What is wrong with my where statement syntax</title>
      <link>https://community.esri.com/t5/python-questions/what-is-wrong-with-my-where-statement-syntax/m-p/303567#M23614</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Look at your line 20.&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;arcpy.Select_analysis("Locations_lyr"),\&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Maybe you wanted to comment that out?&amp;nbsp; The syntax in that line is incorrect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BTW - to post python code, you can use the syntax highlighter and select python.&amp;nbsp; when commenting, this is found in the ...More pulldown.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Oct 2016 15:54:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/what-is-wrong-with-my-where-statement-syntax/m-p/303567#M23614</guid>
      <dc:creator>RebeccaStrauch__GISP</dc:creator>
      <dc:date>2016-10-05T15:54:41Z</dc:date>
    </item>
    <item>
      <title>Re: What is wrong with my where statement syntax</title>
      <link>https://community.esri.com/t5/python-questions/what-is-wrong-with-my-where-statement-syntax/m-p/303568#M23615</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin: 0in 0in 10pt;"&gt;I see a couple of things.&amp;nbsp; First, do not use closed parenthesis on line 20.&amp;nbsp; Use indentation for the command.&amp;nbsp; Since the command variables are in parenthesis, there is no need for a backslash. And line 22 syntax is incorrect.&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Select_analysis&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"Locations_lyr"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; r&lt;SPAN class="string token"&gt;"M:\NRD_Maps\etc"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="string token"&gt;'"Marker" = "'&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; sitename &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'"'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Lines 23-25 and 28-29 should also use indentation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edit -&lt;/P&gt;&lt;P&gt;Perhaps line 22 should be like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="string token"&gt;'\'"Marker" = \\\''&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; sitename &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'\\\'\''&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is some discussion on this command &lt;A href="http://gis.stackexchange.com/questions/184798/using-variable-in-arcpy-select-analysis" rel="nofollow noopener noreferrer" target="_blank"&gt;here&lt;/A&gt;&amp;nbsp;regarding the where clause.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 14:33:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/what-is-wrong-with-my-where-statement-syntax/m-p/303568#M23615</guid>
      <dc:creator>RandyBurton</dc:creator>
      <dc:date>2021-12-11T14:33:03Z</dc:date>
    </item>
    <item>
      <title>Re: What is wrong with my where statement syntax</title>
      <link>https://community.esri.com/t5/python-questions/what-is-wrong-with-my-where-statement-syntax/m-p/303569#M23616</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;On a peripheral note, you would be advised to locate your work in a shorter path structure since there are acceptable limits for certain data types and the error message returned has nothing to do with the length of the path, severely restricting one's ability to track down errors.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Oct 2016 17:29:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/what-is-wrong-with-my-where-statement-syntax/m-p/303569#M23616</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2016-10-05T17:29:46Z</dc:date>
    </item>
  </channel>
</rss>

