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

124
0
10-07-2022 08:41 AM
Gene_Sipes
New Contributor

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. 

Gene_Sipes_2-1665156766717.png

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

Gene_Sipes_1-1665156741114.png

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

Gene_Sipes_3-1665156942856.png

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