Select to view content in your preferred language

Make Query Table

8822
19
Jump to solution
09-30-2014 03:26 PM
JeffWard
Honored Contributor

I am having trouble running the Make Table Query tool.  I have run the tool before with success.  I am trying to create a new feature class with one polygon per related record in a table.  The error I get is :

ERROR 999999: Error executing function.

Attribute column not found [42S22:[Microsoft][SQL Server Native Client 10.0][SQL Server]Invalid column name 'V__574.GISID'.] [sde.DBO.QueryTable]

Attribute column not found [42S22:[Microsoft][SQL Server Native Client 10.0][SQL Server]Invalid column name 'V__574.GISID'.] [InputFeatures]

The table was not found. [OutputFeatureClass]

If I run the tool in a model by itself, I get no errors, it's when I try to export the features to a feature class using "Copy Features" that I get the above error.

I am running version 10.2.2

Thanks for any insight in advance

Jeff Ward

Summit County GIS

Jeff Ward
Summit County, Utah
0 Kudos
19 Replies
JeffWard
Honored Contributor

This is the bug number they gave me.  It says it is fixed though.

Jeff Ward
Summit County, Utah
0 Kudos
LanceShipman
Esri Regular Contributor

The handling of double quotes in the Query Builder is NIM102585. We are review the issues with single quotes resulting in a cross join. Once we get a handle on it we will post an additional bug number.

0 Kudos
TiffanySelvidge1
Frequent Contributor

I have tried both the work-arounds mentioned but neither one works. I am unable to do any Make Query Table functions.

0 Kudos
LanceShipman
Esri Regular Contributor

Can you post your Query. What data source are you using? What version of the software?

0 Kudos
TiffanySelvidge1
Frequent Contributor

"ArcDev.GISOWNER.OIDTest_sites_2015i_2016"."Modified" > max("ArcDev.GISOWNER.Geocoded_allrecords"."Modified")

I am using ArcMap 10.2.2 and working in ModelBuilder. My data is from an SDE geodatabase.

The error occurs no matter which columns I select and no matter which tables I use. 'Make Query Table' is fine with the columns if I do not use a 2nd table in the query but anytime another table is added, I cannot do anything.

I have tried the default double quotes, single quotes and the shown-above multiple double-quotes.

0 Kudos
LanceShipman
Esri Regular Contributor

Have you tried the query without the max function?

0 Kudos
TiffanySelvidge1
Frequent Contributor

Yes, it still does not work.

0 Kudos
LanceShipman
Esri Regular Contributor

1) What error is returned?

2) Is the second table registered with the GeoDatabase (includes an ObjectID)?

3) Does the second table include a geometry column?

0 Kudos
TiffanySelvidge1
Frequent Contributor

The error returned is "Invalid Column Name"

The second table is registered and includes a "Shape" geometry column.

If I use the double double quotes then I received the error: "The multipart identifier ArcDev.GISOWNER.OIDTest_sites_2015i_2016"."Modified" could not be bound. Same for single quotes.

0 Kudos
DylanKennard
Occasional Contributor

This needs to be clarified for ArcGIS Desktop 10.2.2.  Hopefully it will save some folks hours as this destroyed my morning.  Yes removing all quotes in an SDE/SQL Database does work for example: SANDBOX.DBO.TABLE.PrimaryKey = SANDBOX.DBO.TABLE.Primary_Key    HOWEVER if you run the tool without unchecking your "OBJECTID" fields within "Field Names" the tool will output for a lack of a better term "Full Join" or FAIL.  For example I had 100 polygons and 300 records.  It outputted 30,000 plus polygons with lots of false joins! In essence with OBJECTID checked It duplicates everything and joins to everything (and maybe ignores your query?). I then ran the same thing again and it failed. Remember this tools keeps everything in memory.

Capture.JPG

Lastly to get on the fog horn to ESRI This tool is key to almost any GIS user....why since it has been released has it not been stable?  Good luck trying to use it in Python or Geoprocessing Model. It took me hours to get that correct too!  Export to Python Snippet doesn't work well for this tool either without some editing.