Hello ,
I am working on this Damn it Highways layer and I need to selected some labels for some of the highways. One of them I need to "turn it off" but it would not let me to.
I have this map that I am working on and is for to put on the webpage later.
That label I-25 I drew the red circle the lower right bottom of the map in Southwestern Kansas I need that to turn off but leave the road on. It would not turn it off.
Why doesn't my SQL query not working ?
I take it that feature you want to remove the label from is "FID" = 321?
After I posted it here, I played it around a little bit and decide to flipped the expression like this:
"FID" <> 321 AND "HWY_SYMBOL" = '25' OR "HWY_SYMBOL" = '70'
that worked ! That I-25 Label now disappear !
I suspect it's just a matter of how the SQL interprets the grouping of your terms, which is why you should always force your grouping with parentheses. I suspect in your original attempt ("HWY_SYMBOL" = '25' OR "HWY_SYMBOL" = '70' AND "FID" <> 321), it was interpreted as:
"HWY_SYMBOL" = '25' OR ("HWY_SYMBOL" = '70' AND "FID" <> 321)
Since FID=321 is HWY_SYMBOL='25', all labels will show.
I think you could change your original to the following:
("HWY_SYMBOL" = '25' OR "HWY_SYMBOL" = '70') AND "FID" <> 321
This will first filter the HWY_SYMBOL to either '25' or '70', and from those, remove FID=321.
I tried to put parentheses on the first expression before the OR and didn't work so my expression wasn't right. So, that is why I move the FID <> 321 at the beginning of the expression and then insert the HWY_SYMBOL = 25 or HWY_SYMBOL = 70. after the AND.
Are you sure that you have this values in the field?
could you identify the road before create the SQL expression to know what the value you need ?
Not sure what you mean ?
It is not the value it is the Feature Identifier that I want to turn it off ...