Python Scripting Problem

Discussion created by hadpadmasiri on Mar 13, 2014
Latest reply on Mar 13, 2014 by AdamCox
Dear Sir
I want to replace "TextString" field attribute values with "Name_Sin" attribute values in an another table.
for that  I wrote a script to join two tables and calculate the attributes. But the expression is something wrong.
I have no idea to correct it. So please  help me to correct it.



My Script
arcpy.MakeFeatureLayer_management("PCL_Anno", "PCL_Anno_Lyr")
arcpy.AddJoin_management("PCL_Anno_Lyr", "Text", r"C:\CMSupport.gdb\Conv_Tab", "Nam_Idm", "KEEP_ALL")
arcpy.CalculateField_management("PCL_Anno_Lyr", "TextString", "!TextString! = !Name_Sin!", "PYTHON_9.3", "")
arcpy.CopyFeatures_management("PCL_Anno_Lyr", "PCL_Anno_New")

Error Message
Traceback (most recent call last):
  File "E:\Gampaha\Scripts\Script1.py", line 89, in <module>
    arcpy.CalculateField_management("PCL_Anno_Lyr", "TextString", "!TextString! = !Name_Sin!", "PYTHON_9.3", "")
  File "c:\program files (x86)\arcgis\desktop10.1\arcpy\arcpy\management.py", line 3128, in CalculateField
    raise e
ExecuteError: ERROR 000539: SyntaxError: invalid syntax (<expression>, line 1)
Failed to execute (CalculateField).

Failed to execute (LISTool1.0).