Select to view content in your preferred language

Problem with Where clause

767
1
04-23-2013 11:52 AM
DonFreeman
Emerging Contributor
What are the limitations with the WHERE clause of a FeatureLayer? I need to embed some SQL into it but my attempt to use the LIKE operator seems to not work. See below:

<esri:FeatureLayer ID="FutureLines"
 DisableClientCaching="False" 
 Url="http://gismaps.pagnet.org/ArcGIS/rest/services/TipData/MapServer/1"
 OutFields="*" 
 Where="RtaID Like 'RTA*' and (DevelopmentStatus='Not Started' or DevelopmentStatus='On Hold')"
 Renderer="{StaticResource FutureLinesRenderer}"
 >

Ultimately I will also need to parse out an integer value from the 5th and 6th characters of the RtaID. The format is like this: 'RTA-34a'. I need to display the features where the first 3 characters are 'RTA' and the integer value of the 5th and 6th is less than 35. Can someone help me out here?
Thanks
0 Kudos
1 Reply
DonFreeman
Emerging Contributor
Yikes! I had the wildcard wrong. Now this works in SSMS
 where (RtaID LIKE 'RTA%' and convert(integer,SUBSTRING(RtaID,5,2)) < 36) and (DevelopmentStatus='Not Started' or DevelopmentStatus='On Hold')

but how can I use it in the FeatureLayer Where clause? The less than symbol seems to be the problem.
0 Kudos