ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

  • My Profile
  • Help
  • Sign Out
ArcGIS Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS Desktop

A complete professional GIS

ArcGIS Enterprise

GIS in your enterprise

ArcGIS Developers

Tools to build location-aware apps

ArcGIS Solutions

Free template maps and apps for your industry

ArcGIS Marketplace

Get apps and data for your organization

  • Documentation
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

ArcMap

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • Extensions

00075: Query layer has a complex query

  • Solution
  • More information

You attempted to publish a query layer defined by a complex SQL query to a feature service.

Solution

Do one of the following:

  • If editing is not required, publish a map service instead of a feature service.
  • If editing and, therefore, a feature service are required, simplify the SQL query defining your query layer by removing complex elements such as joins or WHERE clauses. An example of a simple query is as follows:
    SELECT id, statename, population, shape FROM mydb.myuser.US_States
    
  • If the data from the query layer is not needed in the resultant feature service, remove it from the map before publishing.

More information

A query layer is a layer or stand-alone table defined by an SQL query. Query layers allow you to integrate both spatial and nonspatial information stored in a database management system into GIS projects within ArcMap.

When working in ArcMap, you create query layersby defining an SQL query. The query is then run against the tables and views in a database, and the result set is added to ArcMap as a layer or stand-alone table (depending on whether the query includes a spatial field).

When you publish a feature service to ArcGIS Server, the SQL query that defines the query layer must be simple. A simple query can contain a subset of the fields in the table—for example, SELECT objectid, shape FROM mydb.myuser.US_States—but WHERE clauses and joins are not supported when publishing a feature service. For instance, you cannot publish a query layer that selects a subset of rows using a WHERE clause.

Learn more about authoring feature services for ArcGIS Server

ArcGIS Desktop

  • Home
  • Documentation
  • Support

ArcGIS

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS
  • ArcGIS Developer
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

  • About Us
  • Careers
  • Esri Blog
  • User Conference
  • Developer Summit
Esri
Tell us what you think.
Copyright © 2021 Esri. | Privacy | Legal