Attribute column not found

Last Published: November 16, 2021

Error Message

After creating a feature layer using a QueryDef, identifying features may fail with the following error:

Oracle: "Attribute column not found:[ORA-00904: invalid column name][<name of QueryDef>]"
SQLServer: "Attribute column not found[Microsoft OLE DB Provider for SQL Server: Deferred prepare could not be completed][][<name of QueryDef>]"

When the table for the layer is opened, it does not display any rows.


The QueryDef object is not handling wild cards (*) for its SubFields property if there are fully qualified fields in any of the tables (for example AREA).

Solution or Workaround

If using wild cards for the SubFields property in the QueryDef, such as:

.SubFields = "*" 
.SubFields = "<table name>.*" 

And there is a qualified field name in the table, it is necessary to explicitly list those fields that are to be included in the QueryDef, even if it is all of the fields in the table:

.SubFields = "field1,field2,field3,..." 

Article ID:000003383

  • 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