Is This Content Helpful?
We're glad to know this article was helpful.
When labeling features with 'define classes of features and label each class differently', the following error message is returned:
"One or more layers failed to draw: An invalid SQL statement was used. [ ]"
and no labels appear on the map.
On the Layer Properties dialog box > Labels tab, multiple label classes can be defined for a single layer in the Method drop-down list. Each label class is defined by a SQL query. If this query has invalid syntax, this error message appears and labels are not drawn.
It is possible to get label classes with invalid SQL syntax by using the Get Symbology Classes option. Clicking this button automatically builds label classes to match the symbology classes. The above error message can occur because of the following reasons:
1. A comma is being used as the decimal delimiter, such as in German, French, Italian, Lithuanian, etc.
2. The symbology is classified, for example, graduated colors or graduated symbols.
3. The class breaks are decimal delimited. For example, the value field is a double, or normalizing is used to create breaks that contain decimal delimiters.
Correct the invalid SQL syntax by editing the query for each label class.
For the scenario stated in the cause, use a period (.) instead of a comma (,) as a decimal delimiter.
"AREA" > 66,063000 AND "AREA" <= 70812,056000
"AREA" > 66.063000 AND "AREA" <= 70812.056000