PROBLEM

Not all rows are returned when generating a layer or table based on a Query

Last Published: April 25, 2020

Description

There are fewer rows in the table created from a query than expected. More rows are returned when executing the same query on my database.

Cause

The ArcObjects components that store the query also take a primary key column name which is used to generate ObjectId's. If this column is not unique, only 1 row is returned per unique value. For example, if a table has 10 rows but only 7 unique values in the unique column, only 7 rows are returned.

Solution or Workaround



  • Use another column as the primary key which truly has unique values.
  • Do not set a primary key. This may result in slower performance, but the results will be as expected.

Article ID:000005733

Software:
  • ArcMap 9 x
  • ArcMap 8 x

Receive notifications and find solutions for new or common issues

Get summarized answers and video solutions from our new AI chatbot.

Download the Esri Support App

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options