AnsweredAssumed Answered

where clause

Question asked by on Oct 21, 2019
Latest reply on Oct 22, 2019 by bixb0012

How do I pass a text value from a GetParameterAsText into a where clause:



Within a geodatabase feature class ( FC ) is an attribute = Title

Title has several rows that have "Seal" within the title such as "Harbor Seals within Cook Inlet", "Seal Population near Point Lay", etc.

I want to create a Python Tools where the user can input a word search from the Title attribute = Seals 


input = arcpy.GetParameterAsText(0)  # input = "Seal"

cursor = arcpy.SearchCursor(fc, "Title LIKE input")  # obviously this line of code does not work

I need to include a "where clause" that include the "input" = seals