I have created python script tool in arcgis 10.1 as below.
I am trying to take input parameter and passing to select statement.
There is error when i execute this tool.
import arcpy
from arcpy import env
env.workspace = "Database Connectionssc_dev.sde"
name = arcpy.GetParameterAsText(0)
arcpy.SelectLayerByAttribute_management ("SC.STATES", "NEW_SELECTION", " "STATE_NAME" = name")
The error is Failed to execute….Invalid expression..ERROR 000358