0

What is wrong with this query

select  a.TESTDATE  from testr a,XREFRTGTE b where a.id = b.id and a.TESTDATE between BETWEEN STR_TO_DATE('2011-05-26 12:22:33','YYYY-MM-DD HH:MM:SS') AND STR_TO_DATE('2011-06-02 12:22:33','YYYY-MM-DD HH:MM:SS') limit 200

Please help

1
  • 1
    I see two between and I don't know why you're using str_to_date if you have to datetime fields and not strings. Commented Jun 2, 2011 at 7:09

1 Answer 1

2

I can see two between used in the query:

... between BETWEEN ...

Try dropping one.

Sign up to request clarification or add additional context in comments.

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.