<?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 Issue with SQL Expression using &amp;amp;quot;in_memory&amp;amp;quot; dataset in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/issue-with-sql-expression-using-amp-quot-in-memory/m-p/358715#M28313</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am trying to perform an SQL expression within the MakeFeatureLayer_management tool on a dataset stored in the "in_memory" workspace, like this...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.MakeFeatureLayer_management("in_memory\\resourceOL", "in_memory\\resourceOL_layer", "\"landuse\" = 0")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But this isn't working.&amp;nbsp; I've also tried '"landuse" = 0', which didn't work either.&amp;nbsp; However, when I run the "Make Feature Layer" tool from the System Toolboxes, it works fine.&amp;nbsp; My current work around is to use arcpy.UpdateCursor() to delete rows where values in landuse != 0.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So, my questions are:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;a) Am I doing something obviously wrong (e.g., syntax)?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;b) If not, has anyone else experienced this?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;c) If so, is this a bug within the arcpy module?&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am new to the forum, so I apologize if this has already been discussed (I wasn't able to find anything in a quick search).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Chris Karstens&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 25 Feb 2012 15:34:13 GMT</pubDate>
    <dc:creator>ChrisKarstens</dc:creator>
    <dc:date>2012-02-25T15:34:13Z</dc:date>
    <item>
      <title>Issue with SQL Expression using &amp;quot;in_memory&amp;quot; dataset</title>
      <link>https://community.esri.com/t5/python-questions/issue-with-sql-expression-using-amp-quot-in-memory/m-p/358715#M28313</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am trying to perform an SQL expression within the MakeFeatureLayer_management tool on a dataset stored in the "in_memory" workspace, like this...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.MakeFeatureLayer_management("in_memory\\resourceOL", "in_memory\\resourceOL_layer", "\"landuse\" = 0")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But this isn't working.&amp;nbsp; I've also tried '"landuse" = 0', which didn't work either.&amp;nbsp; However, when I run the "Make Feature Layer" tool from the System Toolboxes, it works fine.&amp;nbsp; My current work around is to use arcpy.UpdateCursor() to delete rows where values in landuse != 0.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So, my questions are:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;a) Am I doing something obviously wrong (e.g., syntax)?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;b) If not, has anyone else experienced this?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;c) If so, is this a bug within the arcpy module?&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am new to the forum, so I apologize if this has already been discussed (I wasn't able to find anything in a quick search).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Chris Karstens&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 25 Feb 2012 15:34:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/issue-with-sql-expression-using-amp-quot-in-memory/m-p/358715#M28313</guid>
      <dc:creator>ChrisKarstens</dc:creator>
      <dc:date>2012-02-25T15:34:13Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with SQL Expression using "in_memory" dataset</title>
      <link>https://community.esri.com/t5/python-questions/issue-with-sql-expression-using-amp-quot-in-memory/m-p/358716#M28314</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;the second argument of arcpy.MakeFeatureLayer_management is the name of the layer, not the "location".&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;change your code in arcpy.MakeFeatureLayer_management("in_memory\\resourceOL", "resourceOL_layer", "\"landuse\" = 0")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;should work.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ciao,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;AC&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Feb 2012 07:25:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/issue-with-sql-expression-using-amp-quot-in-memory/m-p/358716#M28314</guid>
      <dc:creator>AlessandroCinnirella</dc:creator>
      <dc:date>2012-02-27T07:25:39Z</dc:date>
    </item>
  </channel>
</rss>

