00065: Layer has a definition expression
Your layer has a definition query and you are publishing to either a spatial data server (SDS), or to hosted services with feature access enabled. SDS and hosted feature services do not support layers using definition expressions.
Solution
- One way to keep the definition expression in the layer you want to publish is to create a view. A view is a stored query that selects data from specified tables.
Learn more about views and creating a database view in ArcGIS for Desktop
- Or, you could create a new geodatabase feature class based on the definition expression.
- Right-click the layer in the table of contents.
- Click Data from the context menu.
- Click Export Data from the pull-right menu.
- Remove the definition expression from your layer.
- Open the Layer Properties dialog box.
- Click the Definition Query tab.
- Select the query in the text box if it is not already selected.
- Press the DELETE key on your keyboard.
More information
When you specify a dataset that you want to draw as a map layer, you often only want to draw some of the features in the dataset. In these situations, you can define a query expression to select a subset of features for the layer display. This is referred to as a definition expression or definition query.
Learn more about displaying a subset of features in a layer
Learn more about authoring feature services for a spatial data server (SDS)
12/18/2014