2

I'm trying the following and not working - producing zero results.

Quite tired after a 20hr + programming marathon but can't spot the mistake.

select count(*) from app where lastUpdate Between 2013-11-10 AND 2013-11-21
3
  • Query structure seems to be OK. But don't you get error message because dates are not quoted? Commented Nov 21, 2013 at 22:36
  • shouldn't the date be quoted? Commented Nov 21, 2013 at 22:36
  • Apparently this happens: stackoverflow.com/a/20133449/1688441 Commented Nov 21, 2013 at 22:42

2 Answers 2

4

When dates are not quoted then they would perform calculations which would make the query actually be:

select count(*) from app where lastUpdate Between 1992 AND 1981
Sign up to request clarification or add additional context in comments.

Comments

2

No schema, but try:

select count(*) from app where lastUpdate Between '2013-11-10' AND '2013-11-21'

Comments

Your Answer

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.