bgale88

arcpy.TableCompare_management - Limit to 1 record

Discussion created by bgale88 on Feb 21, 2012
Hello,

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...

>>> #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")
... 


I omit the field "map_apn" because it is included in the newTable but not the currentTable.

QUESTION: How do I limit the comparison to just the first and last record? Or just one record?

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.

Thank you in advance!

Outcomes