laptop and a wrench

Bug

When writing a definition query in ArcGIS Pro on a feature class from a SQL Server database, and the DATEDIFF function is used, the query fails if there are no records returned.

Last Published: November 14, 2019 ArcGIS Pro
Bug ID Number BUG-000126459
SubmittedOctober 31, 2019
Last ModifiedMay 16, 2025
Applies toArcGIS Pro
Version found2.4.2
Operating SystemN/A
Operating System VersionN/A
StatusNon-Reproducible

Additional Information

This issue is no longer reproducible. When no records are found, the validation process returns a warning, and that is expected.

Workaround

  • Avoid using the DATEDIFF SQL function in the definition query. For example, 'Date<(GETDATE()-1)'.
  • Alternatively, use the same expression in ArcMap instead.

Steps to Reproduce

Bug ID: BUG-000126459

Software:

  • ArcGIS Pro

Get notified when the status of a bug changes

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