<?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 arcpy.TableCompare_management - Limit to 1 record in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/arcpy-tablecompare-management-limit-to-1-record/m-p/197439#M15127</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am creating a script that involves the following step: Check the first and last record to make sure they match. I am using the arcpy.TableCompare_management tool. This is my script, so far...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
&amp;gt;&amp;gt;&amp;gt; #Step 5 (Part 2): Compare record attributes
... currentTable = r"C:\BGale\OwnershipScriptTool\OwnershipScriptTool.gdb\ParcelOwnership"
... newTable = r"C:\BGale\OwnershipScriptTool\OwnershipScriptTool.gdb\ParcelOwnership_NEW"
... arcpy.TableCompare_management(currentTable, newTable, "OBJECTID", "ATTRIBUTES_ONLY", "", "", "map_apn", "", r"C:\BGale\OwnershipScriptTool\OwnershipTableCompare.txt")
... 
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I omit the field "map_apn" because it is included in the newTable but not the currentTable. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;QUESTION: How do I limit the comparison to just the first and last record? Or just one record?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Also, how would I limit the fields to just 1 field? I see the omit option, but I don't want to omit 88/90 fields. It seems that I should be able to specify the fields I DO want instead of only the fields I DO NOT want. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you in advance!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 21 Feb 2012 19:20:49 GMT</pubDate>
    <dc:creator>BrittanyGale</dc:creator>
    <dc:date>2012-02-21T19:20:49Z</dc:date>
    <item>
      <title>arcpy.TableCompare_management - Limit to 1 record</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-tablecompare-management-limit-to-1-record/m-p/197439#M15127</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am creating a script that involves the following step: Check the first and last record to make sure they match. I am using the arcpy.TableCompare_management tool. This is my script, so far...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
&amp;gt;&amp;gt;&amp;gt; #Step 5 (Part 2): Compare record attributes
... currentTable = r"C:\BGale\OwnershipScriptTool\OwnershipScriptTool.gdb\ParcelOwnership"
... newTable = r"C:\BGale\OwnershipScriptTool\OwnershipScriptTool.gdb\ParcelOwnership_NEW"
... arcpy.TableCompare_management(currentTable, newTable, "OBJECTID", "ATTRIBUTES_ONLY", "", "", "map_apn", "", r"C:\BGale\OwnershipScriptTool\OwnershipTableCompare.txt")
... 
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I omit the field "map_apn" because it is included in the newTable but not the currentTable. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;QUESTION: How do I limit the comparison to just the first and last record? Or just one record?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Also, how would I limit the fields to just 1 field? I see the omit option, but I don't want to omit 88/90 fields. It seems that I should be able to specify the fields I DO want instead of only the fields I DO NOT want. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you in advance!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Feb 2012 19:20:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-tablecompare-management-limit-to-1-record/m-p/197439#M15127</guid>
      <dc:creator>BrittanyGale</dc:creator>
      <dc:date>2012-02-21T19:20:49Z</dc:date>
    </item>
  </channel>
</rss>

