I am using ArcMap 10.5.1. My table contains pairs of parcel numbers and looks like this. Thank you.
It seems like the table is sorted on PARCEL_NO. Would it be possible to sort this table and create a new table, or is that not an option. This would probably create new OBJECTID and that would allow you to select by attributes using the following SQL:
MOD (OBJECTID, 2) = 0
The table order is important in this case. Cherie
Given a parcel number, which address to you want to select? The low or high address, e.g., 1066 Pine St or 1068 Pine St?
Either all the high addresses or all low addresses. It doesn't matter which, as long as it's consistently high or low. Cherie
You can generate an OID list and then pass every other element to Layer.setSelectionSet:
lyr = # ArcPy mapping layer object
fields = ["OID@", "PARCEL_NO", "WHOLEADDRESS"]
sql = "ORDER BY PARCEL_NO, WHOLEADDRESS"
with arcpy.da.SearchCursor(lyr, fields, sql_clause=(None,sql)) as cur:
oid_list = [row[0] for row in cur]
lyr.setSelectionSet("NEW", oid_list[::2])
That's great! Thanks for your help. I will give it a try. Cherie