0

I try to execute the following query using java.sql.PreparedStatement:

SELECT  NVL (tb.ddate, '2002-10-15')
FROM tb

But get this error:

java.sql.SQLException: ORA-01843: ¿¿¿¿ ¿¿ ¿¿¿

What is wrong?

2
  • 1
    Wrong date format? Month is usually in JAN, FAB or like that Commented Feb 28, 2012 at 20:44
  • @BhrugeshPatel: that is absolutely perfect date format. (October, 15th, 2002) Commented Feb 28, 2012 at 21:56

1 Answer 1

3

The date is not in expected format.

See http://docs.oracle.com/cd/B19306_01/server.102/b14237/initparams122.htm

Or try:

SELECT  NVL (tb.ddate, to_date('2002-10-15', 'YYYY-MM-DD') )
FROM tb
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.