I am brand new to coding, have no background at all. Basically I have about 200 tables with the same info listed under slightly different attribute table headings and I am trying to rename them to match so I can merge them all and move to ArcSDE eventually. I had issues trying it with a few tables(8 total) as a shorter trial run in model builder because the names "REC", "REC_SS" and REC_" did not all exist in just those few files but do in the larger schema of 200. Now I am getting a general error in GIS of 999999 and an error invalid syntax error 000539 but my code is reading fine in a trial python site.
Here is my code and I attached a screen shot too.
This is my code block:
def customReplace(fieldValue):
repList = ("REC")
repValue = "REC_CODE"
for item in repList:
if item in fieldValue:
fieldValue = fieldValue.replace(item, repValue)
return fieldValue
My field expression is:
customReplace ("REC_CODE")