I try to put up a one-to-many relationship between a feature class (one) and a table (many) using MakeQueryTable tool. One entry in the feature class needs to be linked to many entries in the table and I tried to set this up using SQL in the tool (I followed this ESRI article: http://support.esri.com/en/knowledgebase/techarticles/detail/37544):

[Feature_Class].FIELDA = [Table].FIELDB`

The records are matching, it just needs to relate them.

However, it gives me the following error:

could not be retrieved properly. [Table.FIELDB] Failed to execute (MakeQueryTable).

If I try it the other way around, i.e.

[Feature_Class].FIELDB = [Table].FIELDA

it gives

could not be retrieved properly. [Table.FIELDA] Failed to execute (MakeQueryTable).

As far as I can tell, everything is in perfect order, i.e. the table and feature class are in the same DB and I added the feature class first to the tool, in the hope to get out a feature class.

Anyone has any idea?

  • Did you use the expression builder to create the expression? What geodatabase type are you using? For a file geodatabase the expression builder surrounded both the table name and field name in quotes, i.e., "Feature_Class.FIELDA" = "Table.FIELDB". Brackets were not used, although I could not tell if you were just using them to indicate that a real value would be substituted or if they are a literal part of the expression you used. Nov 23, 2015 at 16:04
  • Ok, I resolved the issue now, I think. I used the brackets only for illustration. I did use the expression builder (on a SDE feature class/table) and it automatically puts the field names in quotes. However, the expression is not valid on a SDE feature class (apparently) when put in quotes. When the quotes are manually removed, it works just fine. Thanks for answering though, Richard!
    – nilsnolde
    Nov 24, 2015 at 14:11


Browse other questions tagged or ask your own question.