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


1 Answer 1


Try it with getdate()

ExprDate <= (GETDATE() + 30) AND ExprDate >= GETDATE()
  • 2
    In addition, SQL Server supports the BETWEEN operator: ExprDate BETWEEN GetDate() AND GetDate() + 30
    – Berend
    Commented Mar 11, 2015 at 14:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.