I have a geodatabase in Oracle with around 50 tables. I want to get the values in the 2nd field of every table in my geodatabase. I will be using the values in the 2nd field as an input for a geoprocessing tool. The 2nd field name is different in every table but the values are what I need for the tool. This is the code i'm working with so far:
import arcpy
aWS = r"C:\Users\dav\AppData\Roaming\ESRI\Desktop10.3\ArcCatalog\Connection to OracleGDB.sde"
arcpy.env.workspace = aWS
arcpy.env.overwriteOutput = True
luList = arcpy.ListTables("*LK")
for lu in luList:
print lu
Desc = "DESCRIPTION"
cursor = arcpy.SearchCursor(lu)
for row in cursor:
print(row.getValue(Desc))
#Get the values in the 2nd field of lu and put it in the "2ndField" input
#Run Table to Domain function
arcpy.TableToDomain_management(lu, 2ndField, Desc, "NewGeo.gdb", 2ndFieldName, "DESCRIPTION")