Inline Variable Substitution in SQL Expression Variable Using Model Parameter Value ArcGIS PRO

10-07-2022 08:41 AM
New Contributor III

I am trying to port over a model that I built in ArcMap, to Pro.

I am receiving a SQL error stating "fields do not match" when trying to set up a SQL Expression for use in the Select Layer By Attributes tool. The SQL Expression is connected to the Select by Attributes Tool, and attempts to use inline variable substitution to insert the model parameter value "SectorNumber" in the expression. The goal is to create a selection set of records from Centerline202.. that match Sector = %SectorNumber%.

Here is an overview of the model layout. 


Here is a screenshot showing a valid SQL message when using a hardcoded value of 3. 


When trying to add the "SectorNumber" model parameter as an inline variable in the SQl Expression I get:


I have tried numerous versions of %SectorNumber%, "%SectorNumber%", (%SectorNumber%), and cannot get anything to work. 

The data is file based (FGDB)




0 Kudos
0 Replies