4

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

1 Answer 1

9

Try it with getdate()

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

Your Answer

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

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