ArcGIS-Desktop – Definition Query for Current Date in SQL Server Native Syntax Error 10.2

arcgis-10.2arcgis-desktopdefinition-querysql server

I have this definition query that worked for a layer from a file geodatabase. Now the same query will not work from the same layer in an SDE. I am getting a 'SQL Server Native Client Syntax' error. Any thoughts?

ExprDate <= (CURRENT_DATE + 30) AND ExprDate >= CURRENT_DATE

Screenshot

Best Answer

Try it with getdate()

ExprDate <= (GETDATE() + 30) AND ExprDate >= GETDATE()