1

I have a query in Oracle that looks (in part) like this:

where Doc3.clinicalDate >= ml.convert_date_to_id(:DateBegin)
    and Doc3.clinicalDate < ml.convert_date_to_id(:DateEnd)

When I put this query in SSRS and set up the report and dataset parameters, it works fine. However, if I paste it into Oracle SQL Developer, it pops up a window asking me to "Enter Binds". When I put in "date '2011-06-01'", I get the error "ORA-01858: a non-numeric character was found where a numeric was expected". How do I pass it the date in a format it will actually understand? Thanks.

2
  • 2
    That would depend on the default date format for your database. Try 06-01-2011, 01-Jun-2011, 2011-06-01 (note: all without surrounding apostrophes which would make them strings). Commented May 29, 2012 at 20:33
  • 01-JUN-2011 was the ticket. :-) Would you be so kind as to put this as an answer so I can accept it? Commented May 29, 2012 at 20:42

2 Answers 2

5

That would depend on the default date format for your database. Try 06-01-2011, 01-Jun-2011, 2011-06-01 (note: all without surrounding apostrophes which would make them strings).

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

Comments

3

That's a common problem. I change my query to use to_date(:DateEnd,'DD/MM/YYYY') - than it takes your date as varchar and converts to date.

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.