Select to view content in your preferred language

Date Range Query Fails on Joined Tables

39
2
yesterday
MikhaylaB
Frequent Contributor

I have a point layer and a standalone table that I have joined based on their GlobalID/GUID field. I need to 'select by attributes' to pull out a date range for a report, but it fails with an Invalid SQL Expression error.

If I use the same expression on the point layer with no join, it works great. I've also tried doing this with a python/sql script outside of Pro, and I have the same failed results. I can query for anything except date range. 

Is there any SQL syntax or rule that I would be violating by attempting this query on a joined table? Any ideas why this fails but other queries do not?

 

Enterprise 11.3/Pro 3.3.2

0 Kudos
2 Replies
Robert_LeClair
Esri Esteemed Contributor

This sounds like BUG-000158475 - "Unable to use Select By Attributes on date field types with a joined Excel sheet and a table or feature class from an enterprise geodatabase."  It's in the Product Plan to be fixed but I do not know when.

It was observed initially using SQL Server 2019, Oracle 19c and ArcGIS Pro 3.1.1.  Interesting enough the queries work in SSMS but not ArcGIS Pro.

MichaelVolz
Esteemed Contributor

Since it looks like you are hitting a bug, can you create a new feature class with all needed fields including date fields and then create a model or python script to truncate and append new records to this feature class.  I would recommend a workaround at this point as you have idea when ESRI will fix this bug so you have control with a workaround.

0 Kudos