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

PolyGeo
65.5k29 gold badges115 silver badges350 bronze badges
asked Mar 10, 2015 at 15:51

1 Answer 1

9

Try it with getdate()

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

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.