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 8 x
  • ArcMap 9 x

Get support with AI

Resolve your issue quickly with the Esri Support AI Chatbot.

Start chatting now

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Start chatting now

Go to download options