sql query on labels in ArcView

Covasnianu Adrian

Posted 21 June 2012 - 05:58 AM

Covasnianu Adrian

Contributor

Validated Member

48 posts

Gender:Male

Location:Iasi

Romania

Hi!

I'm trying only to show labels on a shapefile (polyline with elevation attributes). I'm using in ESRI ArcView the define classes of features and label each class differently method. I'm trying to use a SQL query in order to show only the elevation values of 100, 125, 150, 175, 200 and 225 meters representing the principal curves from a shapefile with elevation starting to 85 and ending with 277,5 meters.

Is there a method in the same layer to show only the labels for specific elevations not needed to make some additional operations such as:

- export only the polylines with the needed elevation and then simply to label features- define classes for 100, 125, 150, 175, 200 and 225 meters. A total of 6 classes.

jrat

Posted 21 June 2012 - 06:45 AM

jrat

Master Contributor

Validated Member

143 posts

Gender:Male

Location:Hagerstown, MD

United States

You should be able to restrict the label generation to the specific values you want using sql.
from the labels tab of the layer properties you already selected define classes of features. Now click SQL query. double click the field name for your elevation data, click = , click get unique values, double click the 1st value you want (i.e. 100), click AND. follow this untill you have all the values you want. don't put and at the end.

I am sure there is a simpler SQL query but that has worked for me.

You would only need to define 6 different classes if you wanted each class to look different.
you would use the same SQL query to select features to export or apply a definition query on your layer. The help in the query builder is usefull

Craig Jr

Posted 21 June 2012 - 03:16 PM

same layer to show only the labels for specific elevations not needed to make some additional operations such as:

- export only the polylines with the needed elevation and then simply to label features- define classes for 100, 125, 150, 175, 200 and 225 meters. A total of 6 classes.

Any suggestion is useful!Thanks in advance!

If you only want to label 100, 125, 150, 175, 200 and 225, click the sql query in the label dialogue and use:"Elevation" in (100, 125, 150, 175, 200, 225) This will only label features with those values. If you need to label each of the contour with different font sizes then you would need to create a class for each of the elevations.

Covasnianu Adrian

Posted 22 June 2012 - 01:43 AM

same layer to show only the labels for specific elevations not needed to make some additional operations such as:

- export only the polylines with the needed elevation and then simply to label features- define classes for 100, 125, 150, 175, 200 and 225 meters. A total of 6 classes.

Any suggestion is useful!Thanks in advance!

If you only want to label 100, 125, 150, 175, 200 and 225, click the sql query in the label dialogue and use:"Elevation" in (100, 125, 150, 175, 200, 225) This will only label features with those values. If you need to label each of the contour with different font sizes then you would need to create a class for each of the elevations.

jrat

Posted 22 June 2012 - 08:51 AM

same layer to show only the labels for specific elevations not needed to make some additional operations such as:

- export only the polylines with the needed elevation and then simply to label features- define classes for 100, 125, 150, 175, 200 and 225 meters. A total of 6 classes.

Any suggestion is useful!Thanks in advance!

If you only want to label 100, 125, 150, 175, 200 and 225, click the sql query in the label dialogue and use:"Elevation" in (100, 125, 150, 175, 200, 225) This will only label features with those values. If you need to label each of the contour with different font sizes then you would need to create a class for each of the elevations.

I knew there was a better way. Will that only work with numeric fields?