Excluding Multiple Words from Labeling

473
1
Jump to solution
05-07-2013 08:06 AM
MichaelTrevino
New Contributor II
I want to be able to label my streets with defined classes so I get FSC = 'Freeway' in my SQL query but, I also want the query to exclude any labels like OFFRAMP, ONRAMP, FRONTAGE, ect. I can get the query to exclude one or the other for example:
FSC  = 'FREEWAY'  AND NOT FULL_NAME LIKE '%RAMP%'  will exclude all the 'RAMP' but when I go to add the frontage to the query it makes the '%RAMP'% query no longer work. How do I get both not to show up and preserve my main FSC = 'Freeway' query?

(FSC  = 'FREEWAY'  AND NOT FULL_NAME LIKE '%RAMP%' ) OR (FSC  = 'FREEWAY'  AND NOT FULL_NAME LIKE '%FRONTAGE%')

This didn't work either.

Thanks for any help.

Mike T
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
RobertBorchert
Frequent Contributor III
Depending on where you get your data from roads should or may have a road classification system built in. 

Normally a 2 digit number 01 = Interstate 02= Federal Highway.  Further down the list 22 = Ramp  19 = Frontage Road.

If that attribute exists in your data I would suggest building your query to tell it to only label the particular class.

In my state the attribute is called RTE_Syst as per our DOT

If your roads don't have this classification system built in I would suggest taking the time to do so as you may find a lot of other utility for its use.

I want to be able to label my streets with defined classes so I get FSC = 'Freeway' in my SQL query but, I also want the query to exclude any labels like OFFRAMP, ONRAMP, FRONTAGE, ect. I can get the query to exclude one or the other for example:
FSC  = 'FREEWAY'  AND NOT FULL_NAME LIKE '%RAMP%'  will exclude all the 'RAMP' but when I go to add the frontage to the query it makes the '%RAMP'% query no longer work. How do I get both not to show up and preserve my main FSC = 'Freeway' query?

(FSC  = 'FREEWAY'  AND NOT FULL_NAME LIKE '%RAMP%' ) OR (FSC  = 'FREEWAY'  AND NOT FULL_NAME LIKE '%FRONTAGE%')

This didn't work either.

Thanks for any help.

Mike T

View solution in original post

0 Kudos
1 Reply
RobertBorchert
Frequent Contributor III
Depending on where you get your data from roads should or may have a road classification system built in. 

Normally a 2 digit number 01 = Interstate 02= Federal Highway.  Further down the list 22 = Ramp  19 = Frontage Road.

If that attribute exists in your data I would suggest building your query to tell it to only label the particular class.

In my state the attribute is called RTE_Syst as per our DOT

If your roads don't have this classification system built in I would suggest taking the time to do so as you may find a lot of other utility for its use.

I want to be able to label my streets with defined classes so I get FSC = 'Freeway' in my SQL query but, I also want the query to exclude any labels like OFFRAMP, ONRAMP, FRONTAGE, ect. I can get the query to exclude one or the other for example:
FSC  = 'FREEWAY'  AND NOT FULL_NAME LIKE '%RAMP%'  will exclude all the 'RAMP' but when I go to add the frontage to the query it makes the '%RAMP'% query no longer work. How do I get both not to show up and preserve my main FSC = 'Freeway' query?

(FSC  = 'FREEWAY'  AND NOT FULL_NAME LIKE '%RAMP%' ) OR (FSC  = 'FREEWAY'  AND NOT FULL_NAME LIKE '%FRONTAGE%')

This didn't work either.

Thanks for any help.

Mike T
0 Kudos