00120: Query table has a complex query

Your standalone table is a query table defined by a complex SQL query and you are publishing to a spatial data server (SDS) server.

Solution

More information

Publishing to SDS requires that the SQL query defining the query table be simple. A common example would be as follows: SELECT * FROM Test.dbo.US_States. A simple query can contain a subset of the fields in the table. For example, SELECT objectid, pop2000, pop2010 FROM Test.dbo.US_States. WHERE clauses and joins are unsupported when publishing to an SDS server. For example, you cannot publish a query table where you are selecting a subset of rows in a simple query to an SDS server because it is controlled by the WHERE clause.

A query layer is a layer or standalone table that is defined by an SQL query. Query layers allow both spatial and nonspatial information stored in a DBMS to be easily integrated into GIS projects within ArcMap. Since query layers are using SQL to directly query database tables and views, spatial information used by a query layer is not required to be in a geodatabase.

When working in ArcMap, you create query layers by 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 standalone table (depending on the query).

Learn more about query layers and creating a query layer

Learn more about authoring feature services for a spatial data server (SDS)

12/18/2014