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

8

Try it with getdate()

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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