<?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 Change Query Layer Definition with Arcpy in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/change-query-layer-definition-with-arcpy/m-p/460741#M36094</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a mxd file with some query layers (File-&amp;gt;Add Data-&amp;gt;Add Query Layers). Is it possible to change the query layers's definition with arcpy? I need change both the SQL statement and the database connection.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 12 Jul 2012 14:53:36 GMT</pubDate>
    <dc:creator>DanaReed</dc:creator>
    <dc:date>2012-07-12T14:53:36Z</dc:date>
    <item>
      <title>Change Query Layer Definition with Arcpy</title>
      <link>https://community.esri.com/t5/python-questions/change-query-layer-definition-with-arcpy/m-p/460741#M36094</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a mxd file with some query layers (File-&amp;gt;Add Data-&amp;gt;Add Query Layers). Is it possible to change the query layers's definition with arcpy? I need change both the SQL statement and the database connection.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Jul 2012 14:53:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/change-query-layer-definition-with-arcpy/m-p/460741#M36094</guid>
      <dc:creator>DanaReed</dc:creator>
      <dc:date>2012-07-12T14:53:36Z</dc:date>
    </item>
    <item>
      <title>Re: Change Query Layer Definition with Arcpy</title>
      <link>https://community.esri.com/t5/python-questions/change-query-layer-definition-with-arcpy/m-p/460742#M36095</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Do you mean the Query Layer's Definition Query?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I think you can although I never tried it. You should use ListTableViews function in arcpy.mapping module&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;See the example here &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/ListTableViews/00s300000006000000/"&gt;http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/ListTableViews/00s300000006000000/&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Jul 2012 00:10:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/change-query-layer-definition-with-arcpy/m-p/460742#M36095</guid>
      <dc:creator>SolomonPulapkura</dc:creator>
      <dc:date>2012-07-13T00:10:19Z</dc:date>
    </item>
  </channel>
</rss>

