Field name in-line variable substitution in ModelBuilder SQL query

Discussion created by pmf32608 on Nov 16, 2012
Latest reply on Jan 9, 2013 by etejan
I've created a multivalue list of table field names by calling a python script in ModelBuilder. I'd like to iterate through the list of field names and create SQL queries for the "Select Layer by Attribute" tool. I'd also like to use the field name as an in-line variable in the query. I know how to use a value variable when constructing an SQL query (ex. "FIELDNAME" = '%variable%') but not with a field name. Is it possible?